From 2c8a015109d835f342de92f2fb375e4dabb14474 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Fri, 2 Aug 2019 14:41:17 +0300 Subject: [PATCH] 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. --- src/key-unicode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/key-unicode.c b/src/key-unicode.c index 340a1372..7bc722be 100644 --- a/src/key-unicode.c +++ b/src/key-unicode.c @@ -890,6 +890,14 @@ static const struct { uint16_t keysym; uint16_t ucs; } unicode_to_keysym_table[] = { + /* A few ASCII control characters */ + { 0xff08, '\b' }, /* Backspace */ + { 0xff09, '\t' }, /* Tab */ + { 0xff0a, '\n' }, /* Linefeed */ + { 0xff0b, '\v' }, /* Vert. Tab */ + { 0xff0d, '\r' }, /* Return */ + { 0xff1b, '\033' }, /* Escape */ + { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */ { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */