seoz pushed a commit to branch master.

commit 40641c199b1c1f77cb9aa5724170e7b34ed11e3f
Author: Ryuan Choi <[email protected]>
Date:   Wed Apr 3 02:23:20 2013 +0900

    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.
---
 src/lib/elm_entry.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 5e5d420..253a3fc 100644
--- a/src/lib/elm_entry.c
+++ b/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);

-- 

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

Reply via email to