diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-26 19:16:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-26 19:16:48 +0000 |
commit | c255b789653120979eacdf8bb8eca02487753a8e (patch) | |
tree | 50a07d7bcbac6a0331c47ed4da72f137cdb5b2e5 /src/getchar.c | |
parent | 837ca8f43b9d6b8574a2bfdae219b17c84411730 (diff) |
patch 9.0.0954: cannot detect whether modifyOtherKeys is enabledv9.0.0954
Problem: Cannot detect whether modifyOtherKeys is enabled.
Solution: Use XTQMODKEYS introduced by xterm version 377 to request the
modifyOtherKeys level. Update the keycode check results.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c index 1e03b86c32..142e394aa6 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2463,7 +2463,11 @@ check_simplify_modifier(int max_offset) static int key_protocol_enabled(void) { - return seenModifyOtherKeys || kitty_protocol_state == KKPS_ENABLED; + // If xterm has responded to XTQMODKEYS it overrules seenModifyOtherKeys. + int using_mok = modify_otherkeys_state != MOKS_INITIAL + ? modify_otherkeys_state == MOKS_ENABLED + : seenModifyOtherKeys; + return using_mok || kitty_protocol_state == KKPS_ENABLED; } /* |