diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2024-10-14 11:18:28 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-04 09:53:09 +0100 |
commit | 4da0f0d0cc16606376b3fdb8a257f539b37ab057 (patch) | |
tree | 27f4c18f46bcd938ceb883d78af48145097b1339 /scripts/kconfig | |
parent | kconfig: qconf: set parent in the widget constructor (diff) | |
download | linux-4da0f0d0cc16606376b3fdb8a257f539b37ab057.tar.xz linux-4da0f0d0cc16606376b3fdb8a257f539b37ab057.zip |
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>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/nconf.gui.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 72b605efe549..4bfdf8ac2a9a 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -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 ' ': |