From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Michal Marek <mmarek@suse.cz>
Subject: [PATCH 3/3] menuconfig: allow j/k to move down/up the menu
Date: Wed, 10 Jul 2013 20:45:18 +0530 [thread overview]
Message-ID: <1373469318-13956-4-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1373469318-13956-1-git-send-email-artagnon@gmail.com>
Like in Vim.
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
| 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--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
next prev parent reply other threads:[~2013-07-10 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 15:15 [PATCH v2 0/3] Modernize menuconfig a bit Ramkumar Ramachandra
2013-07-10 15:15 ` [PATCH 1/3] menuconfig: factor out reserved letters Ramkumar Ramachandra
2013-07-10 15:15 ` [PATCH 2/3] menuconfig: remove redundant info from RESERVED_LETTERS Ramkumar Ramachandra
2013-07-10 15:15 ` Ramkumar Ramachandra [this message]
2013-07-14 6:08 ` [PATCH v2 0/3] Modernize menuconfig a bit Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373469318-13956-4-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®