diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-06-10 07:21:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-06-10 07:21:11 +0000 |
commit | 5fe86a3c7b22f5f4e65ad37724b1a90cc430f8e5 (patch) | |
tree | d71b78ad18729ba6105086a1df104627843d5622 /usr.bin/tmux/key-string.c | |
parent | 4b8d5f7f864c45e8e305c519a7f4c3e69cb44ea7 (diff) |
Add another couple of keys needed for extended keys, GitHub issue 2658.
Handle modifier 9 as Meta, GitHub issue 2647.
Diffstat (limited to 'usr.bin/tmux/key-string.c')
-rw-r--r-- | usr.bin/tmux/key-string.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c index 6404504b096..017b8290b18 100644 --- a/usr.bin/tmux/key-string.c +++ b/usr.bin/tmux/key-string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-string.c,v 1.65 2021/04/07 15:46:12 nicm Exp $ */ +/* $OpenBSD: key-string.c,v 1.66 2021/06/10 07:21:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -164,7 +164,7 @@ key_string_get_modifiers(const char **string) key_code key_string_lookup_string(const char *string) { - static const char *other = "!#()+,-.0123456789:;<=>'\r\t\177"; + static const char *other = "!#()+,-.0123456789:;<=>'\r\t\177`/"; key_code key, modifiers; u_int u, i; struct utf8_data ud, *udp; @@ -238,8 +238,12 @@ key_string_lookup_string(const char *string) } /* Convert the standard control keys. */ - if (key < KEYC_BASE && (modifiers & KEYC_CTRL) && - strchr(other, key) == NULL) { + if (key < KEYC_BASE && + (modifiers & KEYC_CTRL) && + strchr(other, key) == NULL && + key != 9 && + key != 13 && + key != 27) { if (key >= 97 && key <= 122) key -= 96; else if (key >= 64 && key <= 95) |