Revamp extended keys support to more closely match xterm and support

mode 2 as well as mode 1. From Stanislav Kljuhhin (GitHub issue 4038).

This changes tmux to always request mode 2 from parent terminal, change
to an unambiguous internal representation of keys, and adds an option
(extended-keys-format) to control the format similar to the xterm(1)
formatOtherKeys resource.
This commit is contained in:
nicm
2024-08-21 04:17:09 +00:00
parent de6bce057a
commit c7e61a01e5
12 changed files with 238 additions and 136 deletions

View File

@ -543,7 +543,7 @@ popup_key_cb(struct client *c, void *data, struct key_event *event)
}
if ((((pd->flags & (POPUP_CLOSEEXIT|POPUP_CLOSEEXITZERO)) == 0) ||
pd->job == NULL) &&
(event->key == '\033' || event->key == '\003'))
(event->key == '\033' || event->key == ('c'|KEYC_CTRL)))
return (1);
if (pd->job != NULL) {
if (KEYC_IS_MOUSE(event->key)) {