diff options
author | nicm <nicm> | 2022-11-02 07:36:07 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-11-02 07:36:07 +0000 |
commit | 9614f5156079773b338a13e95ec932cc7c95b031 (patch) | |
tree | d6962c3d17ce04e50f2c5caeffff2edefa602b55 /input-keys.c | |
parent | 2d08235987efa1e2f9c932c4a5c8a0200b4804c1 (diff) | |
download | rtmux-9614f5156079773b338a13e95ec932cc7c95b031.tar.gz rtmux-9614f5156079773b338a13e95ec932cc7c95b031.tar.bz2 rtmux-9614f5156079773b338a13e95ec932cc7c95b031.zip |
Instead of always setting the extended flag, set it only when searching.
Allows send-keys to work. From Aaron Jensen.
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/input-keys.c b/input-keys.c index 5c4d3e1b..d48d7d09 100644 --- a/input-keys.c +++ b/input-keys.c @@ -431,7 +431,7 @@ input_key_write(const char *from, struct bufferevent *bev, const char *data, int input_key(struct screen *s, struct bufferevent *bev, key_code key) { - struct input_key_entry *ike; + struct input_key_entry *ike = NULL; key_code justkey, newkey, outkey, modifiers; struct utf8_data ud; char tmp[64], modifier; @@ -483,9 +483,10 @@ 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 (s->mode & MODE_KEXTENDED) + ike = input_key_get(key|KEYC_EXTENDED); + if (ike == NULL) + ike = input_key_get(key); if (ike == NULL && (key & KEYC_META) && (~key & KEYC_IMPLIED_META)) ike = input_key_get(key & ~KEYC_META); if (ike == NULL && (key & KEYC_CURSOR)) |