From: Ryuan Choi Date: Tue, 2 Apr 2013 17:23:20 +0000 (+0900) Subject: elm_entry: Menu key does not work on elm_entry X-Git-Tag: upstream/1.20.0~7116^2~14^2~4871 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b577874c289a05af46eea370c20d3f36471b94b;p=platform%2Fupstream%2Fefl.git elm_entry: Menu key does not work on elm_entry This patch adds a behavior that open hoversel to choose copy/paste when pressed menu key. --- diff --git a/legacy/elementary/src/lib/elm_entry.c b/legacy/elementary/src/lib/elm_entry.c index 5e5d420..253a3fc 100644 --- a/legacy/elementary/src/lib/elm_entry.c +++ b/legacy/elementary/src/lib/elm_entry.c @@ -1342,6 +1342,18 @@ _long_press_cb(void *data) } static void +_key_down_cb(void *data, + Evas *evas __UNUSED__, + Evas_Object *obj __UNUSED__, + void *event_info) +{ + Evas_Event_Key_Down *ev = event_info; + + if (!strcmp(ev->keyname, "Menu")) + _menu_call(data); +} + +static void _mouse_down_cb(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, @@ -2811,6 +2823,8 @@ _elm_entry_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) (priv->entry_edje, "elm.text", _markup_filter_cb, obj); evas_object_event_callback_add + (priv->entry_edje, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, obj); + evas_object_event_callback_add (priv->entry_edje, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj); evas_object_event_callback_add (priv->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);