Allow to navigate in some menus using 2, 4, 5, 6 and 8 keys instead of arrow keys
This commit is contained in:
parent
8585ef8e51
commit
5490d4a7eb
1 changed files with 13 additions and 0 deletions
13
src/intrf.c
13
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue