summaryrefslogtreecommitdiffstats
path: root/key-string.c
diff options
context:
space:
mode:
authornicm <nicm>2021-06-10 07:21:09 +0000
committernicm <nicm>2021-06-10 07:21:09 +0000
commite5106bfb9660d5c9470acf9defa1084c61a070d4 (patch)
treedba88c7dde7c1e4a065df2312d049f46de128187 /key-string.c
parent33f9b08bbb043e1fdf5638a6ae517ab7f5e4547a (diff)
Add another couple of keys needed for extended keys, GitHub issue 2658.
Handle modifier 9 as Meta, GitHub issue 2647.
Diffstat (limited to 'key-string.c')
-rw-r--r--key-string.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/key-string.c b/key-string.c
index 8d60f132..c24a33fc 100644
--- a/key-string.c
+++ b/key-string.c
@@ -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)