summaryrefslogtreecommitdiffstats
path: root/key-string.c
diff options
context:
space:
mode:
authornicm <nicm>2021-06-16 08:37:58 +0000
committernicm <nicm>2021-06-16 08:37:58 +0000
commit9f3874e5c74f5d2c990c44ab0e1369d3876eb57b (patch)
tree9d8b83956cd97fa1da368857fb996e5d5558d929 /key-string.c
parent0d0683c28aa467d30c50ac7cc99b95ae829f61a5 (diff)
Pass Ctrl keys through as is when given as hex, GitHub issue 2724.
Diffstat (limited to 'key-string.c')
-rw-r--r--key-string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/key-string.c b/key-string.c
index 406d26dd..4f7be858 100644
--- a/key-string.c
+++ b/key-string.c
@@ -183,6 +183,8 @@ key_string_lookup_string(const char *string)
if (string[0] == '0' && string[1] == 'x') {
if (sscanf(string + 2, "%x", &u) != 1)
return (KEYC_UNKNOWN);
+ if (u < 32)
+ return (u);
mlen = wctomb(m, u);
if (mlen <= 0 || mlen > MB_LEN_MAX)
return (KEYC_UNKNOWN);