diff options
author | nicm <nicm> | 2021-06-10 07:38:28 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-06-10 07:38:28 +0000 |
commit | f02a6c34e0e8bf2c50ee1dfe9cfacf54370a1405 (patch) | |
tree | e6feaf318a3434b1fdf46b4dd5ee50f4b3f70c72 /key-string.c | |
parent | f9f97c8145e97b0295f0792a643286126fe2d3f8 (diff) | |
download | rtmux-f02a6c34e0e8bf2c50ee1dfe9cfacf54370a1405.tar.gz rtmux-f02a6c34e0e8bf2c50ee1dfe9cfacf54370a1405.tar.bz2 rtmux-f02a6c34e0e8bf2c50ee1dfe9cfacf54370a1405.zip |
Move "special" keys into the Unicode PUA rather than making them top bit
set, some compilers do not allow enums that are larger than int. GitHub
issue 2673.
Diffstat (limited to 'key-string.c')
-rw-r--r-- | key-string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/key-string.c b/key-string.c index c24a33fc..406d26dd 100644 --- a/key-string.c +++ b/key-string.c @@ -238,7 +238,7 @@ key_string_lookup_string(const char *string) } /* Convert the standard control keys. */ - if (key < KEYC_BASE && + if (key <= 127 && (modifiers & KEYC_CTRL) && strchr(other, key) == NULL && key != 9 && @@ -368,8 +368,8 @@ key_string_lookup_key(key_code key, int with_flags) goto out; } - /* Is this a UTF-8 key? */ - if (key > 127 && key < KEYC_BASE) { + /* Is this a Unicode key? */ + if (KEYC_IS_UNICODE(key)) { utf8_to_data(key, &ud); off = strlen(out); memcpy(out + off, ud.data, ud.size); |