summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 15:00:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 15:00:29 +0900
commitf7fa84bf93dd19342df3a29a3be613ad9785b8a1 (patch)
treeac425e64e6113a54c680774c7dee725d5388d854
parentf8b38f6c24802fb895615c0fef14994f8083629e (diff)
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 :)
-rw-r--r--src/bin/ui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 94a9bdc..f63c9fe 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -275,7 +275,13 @@ _ui_key(void *data EINA_UNUSED, const Eo_Event *event)
275 if (menu_active) 275 if (menu_active)
276 { 276 {
277 if (!strcmp(ev->keyname, "Left")) menu_sel++; 277 if (!strcmp(ev->keyname, "Left")) menu_sel++;
278 if (!strcmp(ev->keyname, "Right")) menu_sel--; 278 else if (!strcmp(ev->keyname, "Right")) menu_sel--;
279 else if (!strcmp(ev->keyname, "Up")) menu_sel++;
280 else if (!strcmp(ev->keyname, "Down")) menu_sel--;
281 else if (!strcmp(ev->keyname, "Home")) menu_sel = eina_list_count(menu) - 1;
282 else if (!strcmp(ev->keyname, "End")) menu_sel = 0;
283 else if (!strcmp(ev->keyname, "Next")) menu_sel -= 10;
284 else if (!strcmp(ev->keyname, "Prior")) menu_sel += 10;
279 if (menu_sel < 0) menu_sel = 0; 285 if (menu_sel < 0) menu_sel = 0;
280 else if ((unsigned int)menu_sel >= eina_list_count(menu)) menu_sel = eina_list_count(menu) - 1; 286 else if ((unsigned int)menu_sel >= eina_list_count(menu)) menu_sel = eina_list_count(menu) - 1;
281 menu_anim_sel = menu_sel; 287 menu_anim_sel = menu_sel;