From: Thorsten Blum Date: Mon, 14 Oct 2024 09:18:28 +0000 (+0200) Subject: kconfig: nconf: Use TAB to cycle thru dialog buttons X-Git-Tag: v6.13-rc1~16^2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4da0f0d0cc16606376b3fdb8a257f539b37ab057;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 72b605efe549d..4bfdf8ac2a9a3 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 ' ':