diff options
| author | Simon Glass <[email protected]> | 2026-02-13 06:39:09 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-03 10:34:52 -0600 |
| commit | 8353239dabb8079a10fd34167922302288a6a1bd (patch) | |
| tree | 72e0b22dc9e01a527013262c85355cf444e3aef8 | |
| parent | e15b78bcf72bae42c7d198dfac5317c1058b8c26 (diff) | |
menu: Move shortcut-key handling to bootmenu_loop()
The bootmenu_conv_key() function is shared with expo subsystem for key
input. Adding alphanumeric-to-BKEY_SHORTCUT conversion there causes expo
to swallow typed characters instead of inserting them as text, since
BKEY_SHORTCUT falls in the range that expo treats as a command key
rather than passing through.
Move the shortcut-key detection into bootmenu_loop() where it is
only used in the bootmenu context.
Fixes: 8c986521c3c9 ("cmd: bootmenu: permit to select bootmenu entry with a shortcut")
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
| -rw-r--r-- | common/menu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/common/menu.c b/common/menu.c index ae5afa14766..02df3b8f133 100644 --- a/common/menu.c +++ b/common/menu.c @@ -556,11 +556,6 @@ enum bootmenu_key bootmenu_conv_key(int ichar) case ' ': key = BKEY_SPACE; break; - case 'A' ... 'Z': - case 'a' ... 'z': - case '0' ... '9': - key = BKEY_SHORTCUT; - break; default: key = BKEY_NONE; break; @@ -591,8 +586,10 @@ enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu, key = bootmenu_conv_key(c); - if (key == BKEY_SHORTCUT) + if (key == BKEY_NONE && isalnum(c)) { + key = BKEY_SHORTCUT; cch->shortcut_key = bootmenu_conv_shortcut_key(menu, c); + } return key; } |
