menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling

This is preparation to support menu-driven UEFI BootOrder
variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Masahisa Kojima 2022-09-12 17:33:52 +09:00 committed by Heinrich Schuchardt
parent e34158bc33
commit 95fc669774
2 changed files with 12 additions and 0 deletions

View File

@ -548,4 +548,13 @@ void bootmenu_loop(struct bootmenu_data *menu,
/* ^C was pressed */
if (c == 0x3)
*key = KEY_QUIT;
if (c == '+')
*key = KEY_PLUS;
if (c == '-')
*key = KEY_MINUS;
if (c == ' ')
*key = KEY_SPACE;
}

View File

@ -48,6 +48,9 @@ enum bootmenu_key {
KEY_DOWN,
KEY_SELECT,
KEY_QUIT,
KEY_PLUS,
KEY_MINUS,
KEY_SPACE,
};
void bootmenu_autoboot_loop(struct bootmenu_data *menu,