diff --git a/src/global.c b/src/global.c index 24091aa3..c6b5944d 100644 --- a/src/global.c +++ b/src/global.c @@ -443,10 +443,7 @@ size_t shown_entries_for(int menu) return count; } -/* Return the shortcut that corresponds to the values of kbinput (the - * key itself) and meta_key (whether the key is a meta sequence). The - * returned shortcut will be the first in the list that corresponds to - * the given sequence. */ +/* Return the first shortcut in the current menu that matches the given input. */ const keystruct *get_shortcut(int *kbinput) { /* Plain characters and upper control codes cannot be shortcuts. */ @@ -462,8 +459,7 @@ const keystruct *get_shortcut(int *kbinput) return NULL; for (keystruct *s = sclist; s != NULL; s = s->next) { - if ((s->menus & currmenu) && *kbinput == s->keycode && - meta_key == s->meta) + if ((s->menus & currmenu) && *kbinput == s->keycode) return s; } diff --git a/src/rcfile.c b/src/rcfile.c index 87f42ed2..273f1de0 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -823,8 +823,7 @@ void parse_binding(char *ptr, bool dobind) assign_keyinfo(newsc, keycopy, keycode); /* Disallow rebinding ^[ and frequent escape-sequence starter "Esc [". */ - if ((!newsc->meta && newsc->keycode == ESC_CODE) || - (newsc->meta && newsc->keycode == '[')) { + if (newsc->keycode == ESC_CODE || newsc->keycode == '[') { jot_error(N_("Keystroke %s may not be rebound"), keycopy); free_things: free(keycopy);