Skip to contentSkip to conversation

scripts: kconfig: nconf: make nconfig accept jk keybindings

PATCH In review Isak Ellmer 2 participants 2 messages Jun 1, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: kconfig: nconf: make nconfig accept jk keybindings

Make nconfig accept jk keybindings for movement in addition to arrow keys.

---
 scripts/kconfig/nconf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
scripts/kconfig/nconf.c +6 -2
index 7b371bd7fb36..3ba8b1af390f 100644
@@ -52,8 +52,8 @@ static const char nconf_global_help[] =
 "\n"
 "Menu navigation keys\n"
 "----------------------------------------------------------------------\n"
-"Linewise up                 <Up>\n"
-"Linewise down               <Down>\n"
+"Linewise up                 <Up>    <k>\n"
+"Linewise down               <Down>  <j>\n"
 "Pagewise up                 <Page Up>\n"
 "Pagewise down               <Page Down>\n"
 "First entry                 <Home>\n"
@@ -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:
Signature · 1 line
2.35.1
#1 lore raw
Quoted 6 lines · Isak Ellmer

Make nconfig accept jk keybindings for movement in addition to arrow keys.

---

Applied to linux-kbuild.
Thanks.

Quoted 45 lines
 scripts/kconfig/nconf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
scripts/kconfig/nconf.c +6 -3
index 7b371bd7fb36..3ba8b1af390f 100644
@@ -52,8 +52,8 @@ static const char nconf_global_help[] =
 "\n"
 "Menu navigation keys\n"
 "----------------------------------------------------------------------\n"
-"Linewise up                 <Up>\n"
-"Linewise down               <Down>\n"
+"Linewise up                 <Up>    <k>\n"
+"Linewise down               <Down>  <j>\n"
 "Pagewise up                 <Page Up>\n"
 "Pagewise down               <Page Down>\n"
 "First entry                 <Home>\n"
@@ -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

Signature · 2 lines
Best Regards
Masahiro Yamada