Skip to content

Commit 4da0f0d

Browse files
tobluxmasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 93096d7 commit 4da0f0d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/kconfig/nconf.gui.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,15 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
277277
case KEY_RIGHT:
278278
menu_driver(menu, REQ_RIGHT_ITEM);
279279
break;
280+
case 9: /* TAB */
281+
if (btn_num > 1) {
282+
/* cycle through buttons */
283+
if (item_index(current_item(menu)) == btn_num - 1)
284+
menu_driver(menu, REQ_FIRST_ITEM);
285+
else
286+
menu_driver(menu, REQ_NEXT_ITEM);
287+
}
288+
break;
280289
case 10: /* ENTER */
281290
case 27: /* ESCAPE */
282291
case ' ':

0 commit comments

Comments
 (0)