diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 83ac15dfd..24f41c80d 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1654,6 +1654,22 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed else if (keysym >= '3' && keysym <= '7') data = (char) (keysym - '3' + 0x1B); + /* CTRL+Left: return to previous word */ + else if (keysym == 0xFF51 || keysym == 0xFF96) + return guac_terminal_send_string(term, "\033[1;5D"); + + /* CTRL+Right: go to next word */ + else if (keysym == 0xFF53 || keysym == 0xFF98) + return guac_terminal_send_string(term, "\033[1;5C"); + + /* CTRL+Backspace: remove word (map to CTRL+w) */ + else if (keysym == 0xFF08) + data = (char) 23; + + /* CTRL+Supr: remove word to right */ + else if (keysym == 0xFFFF) + return guac_terminal_send_string(term, "\033D"); + /* Otherwise ignore */ else return 0;