Skip to content

Commit 0862a9e

Browse files
csaavedraaperezdc
authored andcommitted
key-code: add control characters to the Unicode to KeySym table
These are missing and therefore it's not possible to go from a Unicode control character to KeySym. The converse table has them, so let's have them here too.
1 parent caa1481 commit 0862a9e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/key-unicode.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,14 @@ static const struct {
890890
uint16_t keysym;
891891
uint16_t ucs;
892892
} unicode_to_keysym_table[] = {
893+
/* A few ASCII control characters */
894+
{ 0xff08, '\b' }, /* Backspace */
895+
{ 0xff09, '\t' }, /* Tab */
896+
{ 0xff0a, '\n' }, /* Linefeed */
897+
{ 0xff0b, '\v' }, /* Vert. Tab */
898+
{ 0xff0d, '\r' }, /* Return */
899+
{ 0xff1b, '\033' }, /* Escape */
900+
893901
{ 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */
894902
{ 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */
895903
{ 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */

0 commit comments

Comments
 (0)