linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] menuconfig: Allow j/k to move down/up the menu
@ 2013-07-05 11:32 Ramkumar Ramachandra
  2013-07-06 23:00 ` Rob Landley
  0 siblings, 1 reply; 9+ messages in thread
From: Ramkumar Ramachandra @ 2013-07-05 11:32 UTC (permalink / raw)
  To: LKML; +Cc: Michal Marek

Like in Vim.

Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Unsure why nobody has done this yet.

 scripts/kconfig/lxdialog/menubox.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 38cd69c..17fd936 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -307,11 +307,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);
@@ -320,7 +321,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.722.g3244e19.dirty


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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-05 11:32 [PATCH] menuconfig: Allow j/k to move down/up the menu Ramkumar Ramachandra
@ 2013-07-06 23:00 ` Rob Landley
  2013-07-07 18:30   ` Ramkumar Ramachandra
  2013-07-08 23:08   ` Sören Brinkmann
  0 siblings, 2 replies; 9+ messages in thread
From: Rob Landley @ 2013-07-06 23:00 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: LKML, Michal Marek

On 07/05/2013 06:32:59 AM, Ramkumar Ramachandra wrote:
> Like in Vim.
> 
> Cc: Michal Marek <mmarek@suse.cz>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  Unsure why nobody has done this yet.

While you're at it, why don't you add the ws up and down bindings from  
World of Warcraft?

The reason nobody has done this yet is that vi predates the invention  
of cursor keys. They keyboards Bill Joy was using in the 1970's did not  
have standardized cursor keys, in large part because you can't cursor  
around on a teletype printer. Once people started using "glass tty"  
devices (vt100 and such) cursor keys got standardized within a few  
years. They were reasonably ubiquitous by the time the IBM PC showed up  
(the vic 20 and commodore 64 and such all had them; anything that  
displayed to a television instead of through a daisy wheel).

They also didn't have ALT or control keys. The vi modal interface is a  
legacy of not having any standardized keys on the keyboard except  
letters, numbers, and (for 8 bit machines) shift. (There's a song  
"double bucky" to the tune of "Rubber Ducky" that commemorates a  
particular bespoke keyboard design from MIT in the 1970's.) Even the  
punctuation was potluck for a while there, although they could copy  
manual typewriters and the IBM selectric and such for some of that.

And now you know _why_ Linux is over 20 years old and has never needed  
this.

Rob

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-06 23:00 ` Rob Landley
@ 2013-07-07 18:30   ` Ramkumar Ramachandra
  2013-07-08 23:08   ` Sören Brinkmann
  1 sibling, 0 replies; 9+ messages in thread
From: Ramkumar Ramachandra @ 2013-07-07 18:30 UTC (permalink / raw)
  To: Rob Landley; +Cc: LKML, Michal Marek

Rob Landley wrote:
>>  Unsure why nobody has done this yet.
>
> [...]
> And now you know _why_ Linux is over 20 years old and has never needed this.

I was just asking out of curiosity: I'm not old enough to know that
much history.  Isn't it a nice convenience to have _now_?  Or do you
have something against it?

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-06 23:00 ` Rob Landley
  2013-07-07 18:30   ` Ramkumar Ramachandra
@ 2013-07-08 23:08   ` Sören Brinkmann
  2013-07-09 16:27     ` Rob Landley
                       ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Sören Brinkmann @ 2013-07-08 23:08 UTC (permalink / raw)
  To: Rob Landley; +Cc: Ramkumar Ramachandra, LKML, Michal Marek

On Sat, Jul 06, 2013 at 06:00:05PM -0500, Rob Landley wrote:
> On 07/05/2013 06:32:59 AM, Ramkumar Ramachandra wrote:
> >Like in Vim.
> >
> >Cc: Michal Marek <mmarek@suse.cz>
> >Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> >---
> > Unsure why nobody has done this yet.
> 
> While you're at it, why don't you add the ws up and down bindings
> from World of Warcraft?
> 
> The reason nobody has done this yet is that vi predates the
> invention of cursor keys. They keyboards Bill Joy was using in the
> 1970's did not have standardized cursor keys, in large part because
> you can't cursor around on a teletype printer. Once people started
> using "glass tty" devices (vt100 and such) cursor keys got
> standardized within a few years. They were reasonably ubiquitous by
> the time the IBM PC showed up (the vic 20 and commodore 64 and such
> all had them; anything that displayed to a television instead of
> through a daisy wheel).
> 
> They also didn't have ALT or control keys. The vi modal interface is
> a legacy of not having any standardized keys on the keyboard except
> letters, numbers, and (for 8 bit machines) shift. (There's a song
> "double bucky" to the tune of "Rubber Ducky" that commemorates a
> particular bespoke keyboard design from MIT in the 1970's.) Even the
> punctuation was potluck for a while there, although they could copy
> manual typewriters and the IBM selectric and such for some of that.
> 
> And now you know _why_ Linux is over 20 years old and has never
> needed this.
Well, one advantage of these key bindings is, that you don't have to
move your hands away from the base line. And as vim user I find myself
using vim key sequences in all tools. I cannot even count how many
processes I accidentally killed because I tried to scroll using 'k' in
htop where it does 'kill'.

In a nutshell: I'm all for vim key bindings everywhere!

But on the other hand, I can see that it might lead straight to chaos when
everybody pushes his favorite key bindings.

	Sören



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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-08 23:08   ` Sören Brinkmann
@ 2013-07-09 16:27     ` Rob Landley
  2013-07-09 16:55     ` Heimo Stranner
  2013-07-10 14:56     ` Michal Marek
  2 siblings, 0 replies; 9+ messages in thread
From: Rob Landley @ 2013-07-09 16:27 UTC (permalink / raw)
  To: Sören Brinkmann; +Cc: Ramkumar Ramachandra, LKML, Michal Marek

On 07/08/2013 06:08:41 PM, Sören Brinkmann wrote:
> On Sat, Jul 06, 2013 at 06:00:05PM -0500, Rob Landley wrote:
> > On 07/05/2013 06:32:59 AM, Ramkumar Ramachandra wrote:
> > >Like in Vim.
> > >
> > >Cc: Michal Marek <mmarek@suse.cz>
> > >Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> > >---
> > > Unsure why nobody has done this yet.
> >
> > While you're at it, why don't you add the ws up and down bindings
> > from World of Warcraft?
> >
> > The reason nobody has done this yet is that vi predates the
> > invention of cursor keys. They keyboards Bill Joy was using in the
...
> > And now you know _why_ Linux is over 20 years old and has never
> > needed this.
> 
> Well, one advantage of these key bindings is, that you don't have to
> move your hands away from the base line. And as vim user I find myself
> using vim key sequences in all tools. I cannot even count how many
> processes I accidentally killed because I tried to scroll using 'k' in
> htop where it does 'kill'.

A ringing endorsement.

Rob

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-08 23:08   ` Sören Brinkmann
  2013-07-09 16:27     ` Rob Landley
@ 2013-07-09 16:55     ` Heimo Stranner
  2013-07-09 17:07       ` Steven Noonan
  2013-07-10 14:56     ` Michal Marek
  2 siblings, 1 reply; 9+ messages in thread
From: Heimo Stranner @ 2013-07-09 16:55 UTC (permalink / raw)
  To: Sören Brinkmann; +Cc: artagnon, linux-kernel


> Well, one advantage of these key bindings is, that you don't have to
> move your hands away from the base line. And as vim user I find myself
> using vim key sequences in all tools. I cannot even count how many
> processes I accidentally killed because I tried to scroll using 'k' in
> htop where it does 'kill'.
>
> In a nutshell: I'm all for vim key bindings everywhere!
>
I can't agree more!

Because vim key bindings are rather common I can't see a problem if this
patch is applied.

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-09 16:55     ` Heimo Stranner
@ 2013-07-09 17:07       ` Steven Noonan
  2013-07-09 17:15         ` Heimo Stranner
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Noonan @ 2013-07-09 17:07 UTC (permalink / raw)
  To: Heimo Stranner; +Cc: Sören Brinkmann, artagnon, Linux Kernel mailing List

On Tue, Jul 9, 2013 at 9:55 AM, Heimo Stranner <heimo@stranner.org> wrote:
>
>> Well, one advantage of these key bindings is, that you don't have to
>> move your hands away from the base line. And as vim user I find myself
>> using vim key sequences in all tools. I cannot even count how many
>> processes I accidentally killed because I tried to scroll using 'k' in
>> htop where it does 'kill'.
>>
>> In a nutshell: I'm all for vim key bindings everywhere!
>>
> I can't agree more!
>
> Because vim key bindings are rather common I can't see a problem if this
> patch is applied.

The biggest problem I see is the conflict between j/k and the letter
shortcuts used to jump to specific menu items (the letter highlighted
in blue on each item). But I haven't ever used that functionality in
practice, so who knows.

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-09 17:07       ` Steven Noonan
@ 2013-07-09 17:15         ` Heimo Stranner
  0 siblings, 0 replies; 9+ messages in thread
From: Heimo Stranner @ 2013-07-09 17:15 UTC (permalink / raw)
  To: Steven Noonan; +Cc: linux-kernel

On 2013-07-09 19:07, Steven Noonan wrote:
> On Tue, Jul 9, 2013 at 9:55 AM, Heimo Stranner <heimo@stranner.org> wrote:
>>> Well, one advantage of these key bindings is, that you don't have to
>>> move your hands away from the base line. And as vim user I find myself
>>> using vim key sequences in all tools. I cannot even count how many
>>> processes I accidentally killed because I tried to scroll using 'k' in
>>> htop where it does 'kill'.
>>>
>>> In a nutshell: I'm all for vim key bindings everywhere!
>>>
>> I can't agree more!
>>
>> Because vim key bindings are rather common I can't see a problem if this
>> patch is applied.
> The biggest problem I see is the conflict between j/k and the letter
> shortcuts used to jump to specific menu items (the letter highlighted
> in blue on each item). But I haven't ever used that functionality in
> practice, so who knows.
I haven't thought about that. Obviously you are right, "Kernel hacking"
and "Kernel compression mode" just being two examples that use k which I
found in a very quick search.

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

* Re: [PATCH] menuconfig: Allow j/k to move down/up the menu
  2013-07-08 23:08   ` Sören Brinkmann
  2013-07-09 16:27     ` Rob Landley
  2013-07-09 16:55     ` Heimo Stranner
@ 2013-07-10 14:56     ` Michal Marek
  2 siblings, 0 replies; 9+ messages in thread
From: Michal Marek @ 2013-07-10 14:56 UTC (permalink / raw)
  To: Sören Brinkmann; +Cc: Rob Landley, Ramkumar Ramachandra, LKML

Dne 9.7.2013 01:08, Sören Brinkmann napsal(a):
> On Sat, Jul 06, 2013 at 06:00:05PM -0500, Rob Landley wrote:
>> On 07/05/2013 06:32:59 AM, Ramkumar Ramachandra wrote:
>>> Like in Vim.
>>>
>>> Cc: Michal Marek <mmarek@suse.cz>
>>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
>>> ---
>>> Unsure why nobody has done this yet.
>>
>> While you're at it, why don't you add the ws up and down bindings
>> from World of Warcraft?
>>
[...]
> Well, one advantage of these key bindings is, that you don't have to
> move your hands away from the base line. And as vim user I find myself
> using vim key sequences in all tools.

One issue here is that j and k are already taken. Letters other than
h/m/n/y are used as hotkeys in menuconfig/nconf, if there is a menu item
starting with the respective letter. So at a minimum, the patch would
have to add j and k to the reserved set.

Michal

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

end of thread, other threads:[~2013-07-10 14:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-05 11:32 [PATCH] menuconfig: Allow j/k to move down/up the menu Ramkumar Ramachandra
2013-07-06 23:00 ` Rob Landley
2013-07-07 18:30   ` Ramkumar Ramachandra
2013-07-08 23:08   ` Sören Brinkmann
2013-07-09 16:27     ` Rob Landley
2013-07-09 16:55     ` Heimo Stranner
2013-07-09 17:07       ` Steven Noonan
2013-07-09 17:15         ` Heimo Stranner
2013-07-10 14:56     ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).