mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 02:06:15 +01:00
kconfig: nconf: Use TAB to cycle thru dialog buttons
Add the ability to cycle through dialog buttons with the TAB key. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
93096d7d2a
commit
4da0f0d0cc
1 changed files with 9 additions and 0 deletions
|
|
@ -277,6 +277,15 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
|
|||
case KEY_RIGHT:
|
||||
menu_driver(menu, REQ_RIGHT_ITEM);
|
||||
break;
|
||||
case 9: /* TAB */
|
||||
if (btn_num > 1) {
|
||||
/* cycle through buttons */
|
||||
if (item_index(current_item(menu)) == btn_num - 1)
|
||||
menu_driver(menu, REQ_FIRST_ITEM);
|
||||
else
|
||||
menu_driver(menu, REQ_NEXT_ITEM);
|
||||
}
|
||||
break;
|
||||
case 10: /* ENTER */
|
||||
case 27: /* ESCAPE */
|
||||
case ' ':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue