Add enter key input flow to grid selection
[profile/tv/apps/native/filebrowser.git] / src / views / BaseView / FileGrid.cpp
index 981a55a..f59efad 100644 (file)
@@ -456,6 +456,19 @@ void CFileGrid::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev
                        elm_object_item_focus_set(it, EINA_TRUE);
                }
        }
+       else if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
+               it = elm_object_focused_item_get(obj);
+               if (!it) {
+                       _ERR(" unable to get focused item ");
+                       return;
+               }
+               pItemInfo = _find_item_info(m->elItemInfo, it);
+               if (!pItemInfo)
+                       return;
+
+               m->handle_itinfo = pItemInfo;
+               m_HandleSelection();
+       }
        else if (!strcmp(ev->keyname, KEY_MENU) || !strcmp(ev->keyname, KEY_MENU_REMOTE)) {
                it = elm_object_focused_item_get(obj);
                if (!it) {