Skip to content

Commit 7250202

Browse files
GUACAMOLE-1943: Add ctrl+arrows/ctrl+backspace/ctrl+suppr shortcuts
1 parent 7d004ce commit 7250202

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/terminal/terminal.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,22 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed
16541654
else if (keysym >= '3' && keysym <= '7')
16551655
data = (char) (keysym - '3' + 0x1B);
16561656

1657+
/* CTRL+Left: return to previous word */
1658+
else if (keysym == 0xFF51 || keysym == 0xFF96)
1659+
return guac_terminal_send_string(term, "\033[1;5D");
1660+
1661+
/* CTRL+Right: go to next word */
1662+
else if (keysym == 0xFF53 || keysym == 0xFF98)
1663+
return guac_terminal_send_string(term, "\033[1;5C");
1664+
1665+
/* CTRL+Backspace: remove word (map to CTRL+w) */
1666+
else if (keysym == 0xFF08)
1667+
data = (char) 23;
1668+
1669+
/* CTRL+Supr: remove word to right */
1670+
else if (keysym == 0xFFFF)
1671+
return guac_terminal_send_string(term, "\033D");
1672+
16571673
/* Otherwise ignore */
16581674
else
16591675
return 0;

0 commit comments

Comments
 (0)