GUAC-792: Implement remaining C0 control codes.

This commit is contained in:
Michael Jumper 2014-09-11 13:00:12 -07:00
parent c6de459c76
commit 76d6b04d53

View File

@ -1213,12 +1213,18 @@ static int __guac_terminal_send_key(guac_terminal* term, int keysym, int pressed
char data; char data;
/* If valid control code, send it */ /* Keysyms for '@' through '_' are all conveniently in C0 order */
if (keysym >= 'A' && keysym <= 'Z') if (keysym >= '@' && keysym <= '_')
data = (char) (keysym - 'A' + 1); data = (char) (keysym - '@');
/* Handle lowercase as well */
else if (keysym >= 'a' && keysym <= 'z') else if (keysym >= 'a' && keysym <= 'z')
data = (char) (keysym - 'a' + 1); data = (char) (keysym - 'a' + 1);
/* Ctrl+? is DEL (0x7f) */
else if (keysym == '?')
data = 0x7F;
/* Otherwise ignore */ /* Otherwise ignore */
else else
return 0; return 0;