Separate key flags and modifiers, log key flags, make the "xterm" flag more

explicit and fix M- keys with a leading escape.
This commit is contained in:
Nicholas Marriott
2020-05-15 12:16:41 +01:00
parent 031d4864a9
commit 340fd691cb
16 changed files with 260 additions and 222 deletions

View File

@ -71,13 +71,13 @@ cmd_send_keys_inject_key(struct cmdq_item *item, struct cmdq_item *after,
wme = TAILQ_FIRST(&wp->modes);
if (wme == NULL || wme->mode->key_table == NULL) {
if (window_pane_key(wp, tc, s, wl, key|KEYC_XTERM, NULL) != 0)
if (window_pane_key(wp, tc, s, wl, key, NULL) != 0)
return (NULL);
return (item);
}
table = key_bindings_get_table(wme->mode->key_table(wme), 1);
bd = key_bindings_get(table, key & ~KEYC_XTERM);
bd = key_bindings_get(table, key & ~KEYC_MASK_FLAGS);
if (bd != NULL) {
table->references++;
after = key_bindings_dispatch(bd, after, tc, NULL, target);