summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-26 19:16:48 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-26 19:16:48 +0000
commitc255b789653120979eacdf8bb8eca02487753a8e (patch)
tree50a07d7bcbac6a0331c47ed4da72f137cdb5b2e5 /src/map.c
parent837ca8f43b9d6b8574a2bfdae219b17c84411730 (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/map.c')
-rw-r--r--src/map.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/map.c b/src/map.c
index ee249c77ae..505994a852 100644
--- a/src/map.c
+++ b/src/map.c
@@ -315,7 +315,26 @@ list_mappings(
if (p_verbose > 0 && keyround == 1)
{
if (seenModifyOtherKeys)
- msg_puts(_("Seen modifyOtherKeys: true"));
+ msg_puts(_("Seen modifyOtherKeys: true\n"));
+
+ if (modify_otherkeys_state != MOKS_INITIAL)
+ {
+ char *name = _("Unknown");
+ switch (modify_otherkeys_state)
+ {
+ case MOKS_INITIAL: break;
+ case MOKS_OFF: name = _("Off"); break;
+ case MOKS_ENABLED: name = _("On"); break;
+ case MOKS_DISABLED: name = _("Disabled"); break;
+ case MOKS_AFTER_T_KE: name = _("Cleared"); break;
+ }
+
+ char buf[200];
+ vim_snprintf(buf, sizeof(buf),
+ _("modifyOtherKeys detected: %s\n"), name);
+ msg_puts(buf);
+ }
+
if (kitty_protocol_state != KKPS_INITIAL)
{
char *name = _("Unknown");
@@ -329,7 +348,8 @@ list_mappings(
}
char buf[200];
- vim_snprintf(buf, sizeof(buf), _("Kitty keyboard protocol: %s"), name);
+ vim_snprintf(buf, sizeof(buf),
+ _("Kitty keyboard protocol: %s\n"), name);
msg_puts(buf);
}
}