public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: nconf: Use TAB to cycle thru dialog buttons
@ 2024-10-14  9:18 Thorsten Blum
  2024-10-18 17:27 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-10-14  9:18 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Thorsten Blum, linux-kbuild, linux-kernel

Add the ability to cycle through dialog buttons with the TAB key.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 scripts/kconfig/nconf.gui.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index 72b605efe549..aeac9e5b06ee 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 ' ':
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kconfig: nconf: Use TAB to cycle thru dialog buttons
  2024-10-14  9:18 [PATCH] kconfig: nconf: Use TAB to cycle thru dialog buttons Thorsten Blum
@ 2024-10-18 17:27 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2024-10-18 17:27 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: linux-kbuild, linux-kernel

On Mon, Oct 14, 2024 at 6:19 PM Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> Add the ability to cycle through dialog buttons with the TAB key.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---

Applied to linux-kbuild.
Thanks.


>  scripts/kconfig/nconf.gui.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
> index 72b605efe549..aeac9e5b06ee 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 ' ':
> --
> 2.47.0
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-18 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14  9:18 [PATCH] kconfig: nconf: Use TAB to cycle thru dialog buttons Thorsten Blum
2024-10-18 17:27 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox