Pass Ctrl keys through as is when given as hex, GitHub issue 2724.

pull/2755/head
nicm 2021-06-16 08:37:58 +00:00
parent 0d0683c28a
commit 9f3874e5c7
1 changed files with 2 additions and 0 deletions

View File

@ -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);