diff mbox series

scripts: kconfig: nconf: make nconfig accept jk keybindings

Message ID 20220516092423.14327-1-isak01@gmail.com (mailing list archive)
State New, archived
Headers show
Series scripts: kconfig: nconf: make nconfig accept jk keybindings | expand

Commit Message

Isak Ellmer May 16, 2022, 9:24 a.m. UTC
Make nconfig accept jk keybindings for movement in addition to arrow keys.

Signed-off-by: Isak Ellmer <isak01@gmail.com>
---
 scripts/kconfig/nconf.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Masahiro Yamada May 23, 2022, 5:14 p.m. UTC | #1
On Mon, May 16, 2022 at 6:24 PM Isak Ellmer <isak01@gmail.com> wrote:
>
> Make nconfig accept jk keybindings for movement in addition to arrow keys.
>
> Signed-off-by: Isak Ellmer <isak01@gmail.com>
> ---


I am fine with this.


Can you update the help message?


Around line 55:

"Linewise up                 <Up>\n"
"Linewise down               <Down>\n"










>  scripts/kconfig/nconf.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
> index 7b371bd7fb36..ded40e5aabf8 100644
> --- a/scripts/kconfig/nconf.c
> +++ b/scripts/kconfig/nconf.c
> @@ -1105,9 +1105,11 @@ static void conf(struct menu *menu)
>                                 break;
>                         switch (res) {
>                         case KEY_DOWN:
> +                       case 'j':
>                                 menu_driver(curses_menu, REQ_DOWN_ITEM);
>                                 break;
>                         case KEY_UP:
> +                       case 'k':
>                                 menu_driver(curses_menu, REQ_UP_ITEM);
>                                 break;
>                         case KEY_NPAGE:
> @@ -1287,9 +1289,11 @@ static void conf_choice(struct menu *menu)
>                                 break;
>                         switch (res) {
>                         case KEY_DOWN:
> +                       case 'j':
>                                 menu_driver(curses_menu, REQ_DOWN_ITEM);
>                                 break;
>                         case KEY_UP:
> +                       case 'k':
>                                 menu_driver(curses_menu, REQ_UP_ITEM);
>                                 break;
>                         case KEY_NPAGE:
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 7b371bd7fb36..ded40e5aabf8 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1105,9 +1105,11 @@  static void conf(struct menu *menu)
 				break;
 			switch (res) {
 			case KEY_DOWN:
+			case 'j':
 				menu_driver(curses_menu, REQ_DOWN_ITEM);
 				break;
 			case KEY_UP:
+			case 'k':
 				menu_driver(curses_menu, REQ_UP_ITEM);
 				break;
 			case KEY_NPAGE:
@@ -1287,9 +1289,11 @@  static void conf_choice(struct menu *menu)
 				break;
 			switch (res) {
 			case KEY_DOWN:
+			case 'j':
 				menu_driver(curses_menu, REQ_DOWN_ITEM);
 				break;
 			case KEY_UP:
+			case 'k':
 				menu_driver(curses_menu, REQ_UP_ITEM);
 				break;
 			case KEY_NPAGE: