Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-09 Thread Roland Eggner
On 2013-02-09 Saturday at 12:36 +0100 Yann E. MORIN wrote:
> Rolland, All,
> 
> On Saturday 09 February 2013 Roland Eggner wrote:
> > Regarding the / conflict:  My vision is to eliminate the need for 
> > help 
> > keybindings   at all by displaying the related help text beside the 
> > menu permanently, similar to some graphical backends.  For terminals with 
> > COLUMNS>=160 this should be rather easy to implement.  nouveaufb gives me 
> > by 
> > default terminal with 274 columns, “retina” displays are entering the 
> > market 
> > … the frequency of COLUMNS>=160 terminals probably will continue to grow.  
> > While staying compatible with COLUMNS=80, it seems reasonable to use the 
> > capabilities of wider terminals, or what would you say?
> 
> How do you navigate up/down in the help text (when the terminal is not
> high enought to display the entire help) if it is displayed at the same
> time the menu entries are, yet without breaking the UI behavior people
> expect?

Good question.  My vision is a UI similar to mc with directory listing in one 
panel, file content in the other panel, “quick view” and “lynx-like navigation” 
switched on.  Help keybindings   will become superfluous, and keybindings 
  to switch focus between menu and help “panel” will be added.  
Implementation will require some ncurses exercise and more time, than I have 
available in near future.  Thus I keep saying “no promise …”

-- 
Regards
Roland Eggner


pgpA9xTlRVTLL.pgp
Description: PGP signature


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-09 Thread Yann E. MORIN
Rolland, All,

On Saturday 09 February 2013 Roland Eggner wrote:
> On 2013-02-09 Saturday at 02:03 +0100 Yann E. MORIN wrote:
> > On Friday 01 February 2013 Roland Eggner wrote:
> > > Add vi-style navigation keys, based on initial work by Dmitry Voytik.
> > 
> > As much I am a unconditional vim user, I doubt this is a sane idea to
> > include this, as it conflicts with the established UI that people expect,
> > especially since  is remapped and people already rely on  to provide
> > help, not do any other weird thing (like exiting the current submenu).
> 
> Having the most frequently used keys in the middle of the keyboard is 
> a professional computer usage pattern, not an anachronistic one.

I never said it was anachronistic. I just oppose this change as it conflicts
with a fundamental existing behavior (getting help) that people have come to
rely on.

> Regarding the / conflict:  My vision is to eliminate the need for help 
> keybindings   at all by displaying the related help text beside the 
> menu 
> permanently, similar to some graphical backends.  For terminals with 
> COLUMNS>=160 this should be rather easy to implement.  nouveaufb gives me by 
> default terminal with 274 columns, “retina” displays are entering the market 
> … the frequency of COLUMNS>=160 terminals probably will continue to grow.  
> While 
> staying compatible with COLUMNS=80, it seems reasonable to use the 
> capabilities 
> of wider terminals, or what would you say?

How do you navigate up/down in the help text (when the terminal is not
high enought to display the entire help) if it is displayed at the same
time the menu entries are, yet without breaking the UI behavior people
expect?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-09 Thread Yann E. MORIN
Rolland, All,

On Saturday 09 February 2013 Roland Eggner wrote:
 On 2013-02-09 Saturday at 02:03 +0100 Yann E. MORIN wrote:
  On Friday 01 February 2013 Roland Eggner wrote:
   Add vi-style navigation keys, based on initial work by Dmitry Voytik.
  
  As much I am a unconditional vim user, I doubt this is a sane idea to
  include this, as it conflicts with the established UI that people expect,
  especially since h is remapped and people already rely on h to provide
  help, not do any other weird thing (like exiting the current submenu).
 
 Having the most frequently used keys in the middle of the keyboard is 
 a professional computer usage pattern, not an anachronistic one.

I never said it was anachronistic. I just oppose this change as it conflicts
with a fundamental existing behavior (getting help) that people have come to
rely on.

 Regarding the h/H conflict:  My vision is to eliminate the need for help 
 keybindings h ? at all by displaying the related help text beside the 
 menu 
 permanently, similar to some graphical backends.  For terminals with 
 COLUMNS=160 this should be rather easy to implement.  nouveaufb gives me by 
 default terminal with 274 columns, “retina” displays are entering the market 
 … the frequency of COLUMNS=160 terminals probably will continue to grow.  
 While 
 staying compatible with COLUMNS=80, it seems reasonable to use the 
 capabilities 
 of wider terminals, or what would you say?

How do you navigate up/down in the help text (when the terminal is not
high enought to display the entire help) if it is displayed at the same
time the menu entries are, yet without breaking the UI behavior people
expect?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-09 Thread Roland Eggner
On 2013-02-09 Saturday at 12:36 +0100 Yann E. MORIN wrote:
 Rolland, All,
 
 On Saturday 09 February 2013 Roland Eggner wrote:
  Regarding the h/H conflict:  My vision is to eliminate the need for 
  help 
  keybindings h ? at all by displaying the related help text beside the 
  menu permanently, similar to some graphical backends.  For terminals with 
  COLUMNS=160 this should be rather easy to implement.  nouveaufb gives me 
  by 
  default terminal with 274 columns, “retina” displays are entering the 
  market 
  … the frequency of COLUMNS=160 terminals probably will continue to grow.  
  While staying compatible with COLUMNS=80, it seems reasonable to use the 
  capabilities of wider terminals, or what would you say?
 
 How do you navigate up/down in the help text (when the terminal is not
 high enought to display the entire help) if it is displayed at the same
 time the menu entries are, yet without breaking the UI behavior people
 expect?

Good question.  My vision is a UI similar to mc with directory listing in one 
panel, file content in the other panel, “quick view” and “lynx-like navigation” 
switched on.  Help keybindings h ? will become superfluous, and keybindings 
Tab Ctrl-i to switch focus between menu and help “panel” will be added.  
Implementation will require some ncurses exercise and more time, than I have 
available in near future.  Thus I keep saying “no promise …”

-- 
Regards
Roland Eggner


pgpA9xTlRVTLL.pgp
Description: PGP signature


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-08 Thread Roland Eggner
On 2013-02-09 Saturday at 02:03 +0100 Yann E. MORIN wrote:
> On Friday 01 February 2013 Roland Eggner wrote:
> > Add vi-style navigation keys, based on initial work by Dmitry Voytik.
> 
> As much I am a unconditional vim user, I doubt this is a sane idea to
> include this, as it conflicts with the established UI that people expect,
> especially since  is remapped and people already rely on  to provide
> help, not do any other weird thing (like exiting the current submenu).

Having the most frequently used keys in the middle of the keyboard is 
a professional computer usage pattern, not an anachronistic one.

Regarding the / conflict:  My vision is to eliminate the need for help 
keybindings   at all by displaying the related help text beside the menu 
permanently, similar to some graphical backends.  For terminals with 
COLUMNS>=160 this should be rather easy to implement.  nouveaufb gives me by 
default terminal with 274 columns, “retina” displays are entering the market 
… the frequency of COLUMNS>=160 terminals probably will continue to grow.  
While 
staying compatible with COLUMNS=80, it seems reasonable to use the capabilities 
of wider terminals, or what would you say?

Cannot promise when I will find the time to prepare a patch.

-- 
Regards
Roland Eggner


pgpwbWgID_z_5.pgp
Description: PGP signature


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-08 Thread Yann E. MORIN
Roland, All,

On Friday 01 February 2013 Roland Eggner wrote:
> Add vi-style navigation keys, based on initial work by Dmitry Voytik.

As much I am a unconditional vim user, I doubt this is a sane idea to
include this, as it conflicts with the established UI that people expect,
especially since  is remapped and people already rely on  to provide
help, not do any other weird thing (like exiting the current submenu).

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-08 Thread Yann E. MORIN
Roland, All,

On Friday 01 February 2013 Roland Eggner wrote:
 Add vi-style navigation keys, based on initial work by Dmitry Voytik.

As much I am a unconditional vim user, I doubt this is a sane idea to
include this, as it conflicts with the established UI that people expect,
especially since h is remapped and people already rely on h to provide
help, not do any other weird thing (like exiting the current submenu).

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-08 Thread Roland Eggner
On 2013-02-09 Saturday at 02:03 +0100 Yann E. MORIN wrote:
 On Friday 01 February 2013 Roland Eggner wrote:
  Add vi-style navigation keys, based on initial work by Dmitry Voytik.
 
 As much I am a unconditional vim user, I doubt this is a sane idea to
 include this, as it conflicts with the established UI that people expect,
 especially since h is remapped and people already rely on h to provide
 help, not do any other weird thing (like exiting the current submenu).

Having the most frequently used keys in the middle of the keyboard is 
a professional computer usage pattern, not an anachronistic one.

Regarding the h/H conflict:  My vision is to eliminate the need for help 
keybindings h ? at all by displaying the related help text beside the menu 
permanently, similar to some graphical backends.  For terminals with 
COLUMNS=160 this should be rather easy to implement.  nouveaufb gives me by 
default terminal with 274 columns, “retina” displays are entering the market 
… the frequency of COLUMNS=160 terminals probably will continue to grow.  
While 
staying compatible with COLUMNS=80, it seems reasonable to use the capabilities 
of wider terminals, or what would you say?

Cannot promise when I will find the time to prepare a patch.

-- 
Regards
Roland Eggner


pgpwbWgID_z_5.pgp
Description: PGP signature


Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-01 Thread Roland Eggner
>From: Roland Eggner 

Add vi-style navigation keys, based on initial work by Dmitry Voytik.  Users of 
netbooks, notebooks and other devices with keyboards lacking a dedicated number 
keypad will enjoy.  And advanced users of vim, less, mutt, … having navigation 
by keys hjkl “hardwired” in their fingers will “fly” :)
In global help window called by key  provide a table with all current and 
added keybindings:

| Menu navigation keysplain style vi-style   |
| -- |
| Linewise up |
| Linewise down |
| Pagewise up   |
| Pagewise down   |
| First entry   |
| Last entry |
| Enter a submenu   |
| Go back to parent menu   |
| Close a help window|
| Close entry window, apply   |
| Close entry window, forget|
| Start incremental, case-insensitive search for STRING in menu entries, |
| no regex support, STRING is displayed in upper left corner |
| STRING  |
| Remove last character   |
| Jump to next hit |
| Jump to previous hit   |
| Exit menu search mode  |
| Search for configuration variables with or without leading CONFIG_ |
| RegExpr |
| Verbose search help|
| -- |

Intention is an easy to memorize set of keybindings resembling user interfaces 
of other frequently used software, not a strict clone of the historic vi user 
interface.  In contrast to historic vi,   is used for 
characterwise right and left movement by libreadline (bash, xfsprogs, bc, gdb, 
python, ruby, hunspell, mysql, sqlite, gnupg, xine-ui, parted …).  Thus 
pagewise 
movement by   would be weird for my fingers, so I have added 
 , resembling e.g. thread-wise navigation in mutt message lists.

To call help related to the current menu entry, currently any of the keys  
 may be used.  To solve the conflict with new navigation key , this is 
changed to keys  .  Lesser experienced users will not note, they use . 
 
And advanced users will consider, how much faster they can work, when all 
frequently used keys are in the middle of the keyboard.

Signed-off-by: Dmitry Voytik 
Signed-off-by: Roland Eggner 
---
scripts/kconfig/nconf.c |  81 ++--
1 files changed, 51 insertions(+), 30 deletions(-)

To be applied on vanilla 3.8-rc3

diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -12,6 +12,8 @@
 #include "nconf.h"
 #include 
 
+#define KEY_CONTROL(k) ((k) & 0x1f)
+
 static const char nconf_global_help[] = N_(
 "Help windows\n"
 "\n"
@@ -21,7 +23,7 @@ static const char nconf_global_help[] = 
 "o  A short version of the global help is available by key .\n"
 "\n"
 "o  Local help:  To get help related to the current menu entry, use any\n"
-"   of   keys, or if in a data entry window then use  key.\n"
+"   of   keys, or if in a data entry window then use  key.\n"
 "\n"
 "\n"
 "Menu entries\n"
@@ -47,16 +49,16 @@ static const char nconf_global_help[] = 
 "A trailing \"--->\" designates a submenu.\n"
 "\n"
 "\n"
-"Menu navigation keys\n"
+"Menu navigation keysplain style vi-style\n"
 "--\n"
-"Linewise up \n"
-"Linewise down   \n"
-"Pagewise up \n"
-"Pagewise down   \n"
-"First entry \n"
-"Last entry  \n"
-"Enter a submenu   \n"
-"Go back to parent menu   \n"
+"Linewise up \n"
+"Linewise down \n"
+"Pagewise up  \n"
+"Pagewise down  \n"
+"First entry   \n"
+"Last entry \n"
+"Enter a submenu   \n"
+"Go back to parent menu   \n"
 "Close a help window \n"
 "Close entry window, apply   \n"
 "Close entry window, forget\n"
@@ -90,8 +92,8 @@ static const char nconf_global_help[] = 
 "\n"
 "Text Box (Help Window)\n"
 "--\n"
-"Use movement keys   as listed in\n"

Re: [PATCH resend v3 3/3] kconfig: nconf: add vi-style navigation keys

2013-02-01 Thread Roland Eggner
From: Roland Eggner ed...@systemanalysen.net

Add vi-style navigation keys, based on initial work by Dmitry Voytik.  Users of 
netbooks, notebooks and other devices with keyboards lacking a dedicated number 
keypad will enjoy.  And advanced users of vim, less, mutt, … having navigation 
by keys hjkl “hardwired” in their fingers will “fly” :)
In global help window called by key F1 provide a table with all current and 
added keybindings:

| Menu navigation keysplain style vi-style   |
| -- |
| Linewise up Upk|
| Linewise down   Down  j|
| Pagewise up Page Up   Ctrl-b  Ctrl-p |
| Pagewise down   Page Down Ctrl-f  Ctrl-n |
| First entry Home  g|
| Last entry  End   G|
| Enter a submenu Right  Enterl|
| Go back to parent menu  Left   Esc  F5h|
| Close a help window Enter  Esc  F5   |
| Close entry window, apply   Enter|
| Close entry window, forget  Esc  F5|
| Start incremental, case-insensitive search for STRING in menu entries, |
| no regex support, STRING is displayed in upper left corner |
| /STRING  |
| Remove last character   Backspace|
| Jump to next hitDown |
| Jump to previous hitUp   |
| Exit menu search mode   /  Esc |
| Search for configuration variables with or without leading CONFIG_ |
| F8RegExprEnter |
| Verbose search help F8F1   |
| -- |

Intention is an easy to memorize set of keybindings resembling user interfaces 
of other frequently used software, not a strict clone of the historic vi user 
interface.  In contrast to historic vi, Ctrl-f Ctrl-b is used for 
characterwise right and left movement by libreadline (bash, xfsprogs, bc, gdb, 
python, ruby, hunspell, mysql, sqlite, gnupg, xine-ui, parted …).  Thus 
pagewise 
movement by Ctrl-f Ctrl-b would be weird for my fingers, so I have added 
Ctrl-n Ctrl-p, resembling e.g. thread-wise navigation in mutt message lists.

To call help related to the current menu entry, currently any of the keys ? 
h may be used.  To solve the conflict with new navigation key h, this is 
changed to keys ? H.  Lesser experienced users will not note, they use ?. 
 
And advanced users will consider, how much faster they can work, when all 
frequently used keys are in the middle of the keyboard.

Signed-off-by: Dmitry Voytik dvv.ker...@gmail.com
Signed-off-by: Roland Eggner ed...@systemanalysen.net
---
scripts/kconfig/nconf.c |  81 ++--
1 files changed, 51 insertions(+), 30 deletions(-)

To be applied on vanilla 3.8-rc3

diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -12,6 +12,8 @@
 #include nconf.h
 #include ctype.h
 
+#define KEY_CONTROL(k) ((k)  0x1f)
+
 static const char nconf_global_help[] = N_(
 Help windows\n
 \n
@@ -21,7 +23,7 @@ static const char nconf_global_help[] = 
 o  A short version of the global help is available by key F3.\n
 \n
 o  Local help:  To get help related to the current menu entry, use any\n
-   of ? h keys, or if in a data entry window then use F1 key.\n
+   of ? H keys, or if in a data entry window then use F1 key.\n
 \n
 \n
 Menu entries\n
@@ -47,16 +49,16 @@ static const char nconf_global_help[] = 
 A trailing \---\ designates a submenu.\n
 \n
 \n
-Menu navigation keys\n
+Menu navigation keysplain style vi-style\n
 --\n
-Linewise up Up\n
-Linewise down   Down\n
-Pagewise up Page Up\n
-Pagewise down   Page Down\n
-First entry Home\n
-Last entry  End\n
-Enter a submenu Right  Enter\n
-Go back to parent menu  Left   Esc  F5\n
+Linewise up Upk\n
+Linewise down   Down  j\n
+Pagewise up Page Up   Ctrl-b  Ctrl-p\n
+Pagewise down   Page Down Ctrl-f  Ctrl-n\n
+First entry Home  g\n
+Last entry  End   G\n
+Enter a submenu Right  Enterl\n
+Go back to