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; }