[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373469318-13956-4-git-send-email-artagnon@gmail.com>
Date: Wed, 10 Jul 2013 20:45:18 +0530
From: Ramkumar Ramachandra <artagnon@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Michal Marek <mmarek@...e.cz>
Subject: [PATCH 3/3] menuconfig: allow j/k to move down/up the menu
Like in Vim.
Cc: Michal Marek <mmarek@...e.cz>
Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com>
---
scripts/kconfig/lxdialog/menubox.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 698d7c3..151394a 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -57,7 +57,7 @@
*/
#include "dialog.h"
-#define RESERVED_LETTERS "ynmh"
+#define RESERVED_LETTERS "ynmhjk"
static int menu_width, item_x;
@@ -308,11 +308,12 @@ do_resize:
(i < max_choice ||
key == KEY_UP || key == KEY_DOWN ||
key == '-' || key == '+' ||
+ key == 'j' || key == 'k' ||
key == KEY_PPAGE || key == KEY_NPAGE)) {
/* Remove highligt of current item */
print_item(scroll + choice, choice, FALSE);
- if (key == KEY_UP || key == '-') {
+ if (key == KEY_UP || key == '-' || key == 'k') {
if (choice < 2 && scroll) {
/* Scroll menu down */
do_scroll(menu, &scroll, -1);
@@ -321,7 +322,7 @@ do_resize:
} else
choice = MAX(choice - 1, 0);
- } else if (key == KEY_DOWN || key == '+') {
+ } else if (key == KEY_DOWN || key == '+' || key == 'j') {
print_item(scroll+choice, choice, FALSE);
if ((choice > max_choice - 3) &&
--
1.8.3.2.736.g869de25
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists