diff options
author | Thomas Adam <thomas@xteddy.org> | 2022-11-01 12:01:10 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2022-11-01 12:01:10 +0000 |
commit | 36896f6dd0d49d91bcc9c398c68a33818626532c (patch) | |
tree | 81d7d54d4e135093784aa1e6c857e04b35c7b141 /input-keys.c | |
parent | 9dd1f442c5a7f1d8d480476f11bc62cceab2019a (diff) | |
parent | 2d08235987efa1e2f9c932c4a5c8a0200b4804c1 (diff) | |
download | rtmux-36896f6dd0d49d91bcc9c398c68a33818626532c.tar.gz rtmux-36896f6dd0d49d91bcc9c398c68a33818626532c.tar.bz2 rtmux-36896f6dd0d49d91bcc9c398c68a33818626532c.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/input-keys.c b/input-keys.c index ebf61333..aa508028 100644 --- a/input-keys.c +++ b/input-keys.c @@ -306,6 +306,20 @@ static struct input_key_entry input_key_defaults[] = { }, { .key = KEYC_DC|KEYC_BUILD_MODIFIERS, .data = "\033[3;_~" + }, + + /* Tab and modifiers. */ + { .key = '\011'|KEYC_CTRL, + .data = "\011" + }, + { .key = '\011'|KEYC_CTRL|KEYC_EXTENDED, + .data = "\033[9;5u" + }, + { .key = '\011'|KEYC_CTRL|KEYC_SHIFT, + .data = "\011" + }, + { .key = '\011'|KEYC_CTRL|KEYC_SHIFT|KEYC_EXTENDED, + .data = "\033[1;5Z" } }; static const key_code input_key_modifiers[] = { @@ -468,6 +482,8 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key) key &= ~KEYC_KEYPAD; if (~s->mode & MODE_KCURSOR) key &= ~KEYC_CURSOR; + if (~s->mode & MODE_KEXTENDED) + key &= ~KEYC_EXTENDED; ike = input_key_get(key); if (ike == NULL && (key & KEYC_META) && (~key & KEYC_IMPLIED_META)) ike = input_key_get(key & ~KEYC_META); @@ -475,6 +491,8 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key) ike = input_key_get(key & ~KEYC_CURSOR); if (ike == NULL && (key & KEYC_KEYPAD)) ike = input_key_get(key & ~KEYC_KEYPAD); + if (ike == NULL && (key & KEYC_EXTENDED)) + ike = input_key_get(key & ~KEYC_EXTENDED); if (ike != NULL) { log_debug("found key 0x%llx: \"%s\"", key, ike->data); if ((key & KEYC_META) && (~key & KEYC_IMPLIED_META)) |