summaryrefslogtreecommitdiffstats
path: root/src/intrf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-07-30 09:16:22 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-07-30 09:16:22 +0200
commit5490d4a7ebb39064f8a2e7e6ea9e593c4708b062 (patch)
treeb70adbd67e1bb9c971eb2934b3fcb4df21d562f8 /src/intrf.c
parent8585ef8e51b492783c7d4a3125beeacac1d4314a (diff)
Allow to navigate in some menus using 2, 4, 5, 6 and 8 keys instead of arrow keys
Diffstat (limited to 'src/intrf.c')
-rw-r--r--src/intrf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intrf.c b/src/intrf.c
index 0c4b06b..de352fe 100644
--- a/src/intrf.c
+++ b/src/intrf.c
@@ -527,6 +527,19 @@ int wmenuSelect_ext(WINDOW *window, const int yinfo, int y, int x, const struct
}
wmove(window, yinfo, 0 );
wclrtoeol(window);
+ if(strchr(available, key)==NULL)
+ {
+ if(key=='2')
+ key=KEY_DOWN;
+ else if(key=='4')
+ key=KEY_LEFT;
+ else if(key=='5')
+ key=KEY_ENTER;
+ else if(key=='6')
+ key=KEY_RIGHT;
+ else if(key=='8')
+ key=KEY_UP;
+ }
/* Cursor keys */
switch(key)
{