forked from enlightenment/expedite
ui: add more keyboard controls (home/end/pageup/pagedown)
Add support for: up/down/pageup/pagedown/home/end There behaviour kinda makes sense visually, not logically (ie. up goes to the left, pageup also, home also). I didn't add any hint on the ui, just press the keys and test :)
This commit is contained in:
parent
f8b38f6c24
commit
f7fa84bf93
|
@ -275,7 +275,13 @@ _ui_key(void *data EINA_UNUSED, const Eo_Event *event)
|
|||
if (menu_active)
|
||||
{
|
||||
if (!strcmp(ev->keyname, "Left")) menu_sel++;
|
||||
if (!strcmp(ev->keyname, "Right")) menu_sel--;
|
||||
else if (!strcmp(ev->keyname, "Right")) menu_sel--;
|
||||
else if (!strcmp(ev->keyname, "Up")) menu_sel++;
|
||||
else if (!strcmp(ev->keyname, "Down")) menu_sel--;
|
||||
else if (!strcmp(ev->keyname, "Home")) menu_sel = eina_list_count(menu) - 1;
|
||||
else if (!strcmp(ev->keyname, "End")) menu_sel = 0;
|
||||
else if (!strcmp(ev->keyname, "Next")) menu_sel -= 10;
|
||||
else if (!strcmp(ev->keyname, "Prior")) menu_sel += 10;
|
||||
if (menu_sel < 0) menu_sel = 0;
|
||||
else if ((unsigned int)menu_sel >= eina_list_count(menu)) menu_sel = eina_list_count(menu) - 1;
|
||||
menu_anim_sel = menu_sel;
|
||||
|
|
Loading…
Reference in New Issue