tweaks: judge from the key code itself whether it is a Meta keystroke

master
Benno Schulenberg 2020-01-22 13:22:27 +01:00
parent 196e913681
commit 58597b6d9b
2 changed files with 3 additions and 2 deletions

View File

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

View File

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