haiku_loader: add J, K keys support for up/down keys
Arrow keys are not available on some platforms. Change-Id: Ia38797eb12202668a0b0976b31f21f564d140901 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4087 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This commit is contained in:
parent
b7a6ab94c3
commit
7766b5a136
@ -412,7 +412,8 @@ run_menu(Menu* menu)
|
||||
|
||||
item = menu->ItemAt(selected);
|
||||
|
||||
if (TEXT_CONSOLE_IS_CURSOR_KEY(key)) {
|
||||
if (TEXT_CONSOLE_IS_CURSOR_KEY(key) || key == 'j' || key == 'J'
|
||||
|| key == 'k' || key == 'K') {
|
||||
if (item == NULL)
|
||||
continue;
|
||||
|
||||
@ -420,9 +421,13 @@ run_menu(Menu* menu)
|
||||
|
||||
switch (key) {
|
||||
case TEXT_CONSOLE_KEY_UP:
|
||||
case 'k':
|
||||
case 'K':
|
||||
selected = select_previous_valid_item(menu, selected - 1);
|
||||
break;
|
||||
case TEXT_CONSOLE_KEY_DOWN:
|
||||
case 'j':
|
||||
case 'J':
|
||||
selected = select_next_valid_item(menu, selected + 1);
|
||||
break;
|
||||
case TEXT_CONSOLE_KEY_PAGE_UP:
|
||||
|
Loading…
Reference in New Issue
Block a user