From 58597b6d9bccf5f384552d0cfcd132e6fda2a6b4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 22 Jan 2020 13:22:27 +0100 Subject: [PATCH] tweaks: judge from the key code itself whether it is a Meta keystroke --- src/global.c | 3 ++- src/winio.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/global.c b/src/global.c index c6b5944d..e801aaf6 100644 --- a/src/global.c +++ b/src/global.c @@ -419,7 +419,8 @@ int the_code_for(void (*func)(void), int defaultval) if (s == NULL) return defaultval; - meta_key = s->meta; + meta_key = (0x20 <= s->keycode && s->keycode <= 0x7E); + return s->keycode; } diff --git a/src/winio.c b/src/winio.c index 248d563a..516091ad 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1689,7 +1689,7 @@ int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts) const keystruct *shortcut = first_sc_for(currmenu, f->func); put_back(shortcut->keycode); - if (shortcut->meta) + if (0x20 <= shortcut->keycode && shortcut->keycode <= 0x7E) put_back(ESC_CODE); break; }