GUAC-792: Map Ctrl+2 to Ctrl+@, and Ctrl+3 through Ctrl+7 to the remaining codes, anchored such that Ctrl+6 is Ctrl+^.

This commit is contained in:
Michael Jumper 2014-09-11 14:20:57 -07:00
parent 76d6b04d53
commit ca9f2717d5

View File

@ -1225,6 +1225,14 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed
else if (keysym == '?')
data = 0x7F;
/* Map Ctrl+2 to same result as Ctrl+@ */
else if (keysym == '2')
data = 0x00;
/* Map Ctrl+3 through Ctrl-7 to the remaining C0 characters such that Ctrl+6 is the same as Ctrl+^ */
else if (keysym >= '3' && keysym <= '7')
data = (char) (keysym - '3' + 0x1B);
/* Otherwise ignore */
else
return 0;