Hi, all

Entry widget has not processed the key event of keypad such as KP_Left,
KP_Right, KP_Home, KP_End, and so on.
In this patch, those key events is processed.

Please review this patch and apply in svn.

Thanks.
Jihoon Kim
Index: src/lib/edje_entry.c
===================================================================
--- src/lib/edje_entry.c        (리비전 53884)
+++ src/lib/edje_entry.c        (작업 사본)
@@ -1008,7 +1008,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,escape", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Up"))
+   else if (!strcmp(ev->key, "Up") || !strcmp(ev->key, "KP_Up"))
      {
         if (multiline)
           {
@@ -1026,7 +1026,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
           }
         _edje_emit(ed, "entry,key,up", rp->part->name);
      }
-   else if (!strcmp(ev->key, "Down"))
+   else if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "KP_Down"))
      {
         if (multiline)
           {
@@ -1044,7 +1044,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
           }
         _edje_emit(ed, "entry,key,down", rp->part->name);
      }
-   else if (!strcmp(ev->key, "Left"))
+   else if (!strcmp(ev->key, "Left") || !strcmp(ev->key, "KP_Left"))
      {
         if (en->select_allow)
           {
@@ -1059,7 +1059,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,left", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Right"))
+   else if (!strcmp(ev->key, "Right") || !strcmp(ev->key, "KP_Right"))
      {
         if (en->select_allow)
           {
@@ -1098,7 +1098,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,backspace", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Delete"))
+   else if (!strcmp(ev->key, "Delete") || !strcmp(ev->key, "KP_Delete"))
      {
         if (control)
           {
@@ -1122,7 +1122,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,delete", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Home"))
+   else if (!strcmp(ev->key, "Home") || !strcmp(ev->key, "KP_Home"))
      {
         if (en->select_allow)
           {
@@ -1140,7 +1140,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,home", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "End"))
+   else if (!strcmp(ev->key, "End") || !strcmp(ev->key, "KP_End"))
      {
         if (en->select_allow)
           {
@@ -1225,7 +1225,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         // remove a tab
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Prior"))
+   else if (!strcmp(ev->key, "Prior") || !strcmp(ev->key, "KP_Prior"))
      {
         if (en->select_allow)
           {
@@ -1240,7 +1240,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__,
         _edje_emit(ed, "entry,key,pgup", rp->part->name);
         ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
      }
-   else if (!strcmp(ev->key, "Next"))
+   else if (!strcmp(ev->key, "Next") || !strcmp(ev->key, "KP_Next"))
      {
         if (en->select_allow)
           {
@@ -1783,8 +1783,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
 
         if (!en->imf_context) goto done;
 
-        ecore_imf_context_client_window_set(en->imf_context, rp->object);
-        ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->evas);
+        ecore_imf_context_client_window_set(en->imf_context, (void 
*)rp->object);
+        ecore_imf_context_client_canvas_set(en->imf_context, (void 
*)rp->edje->evas);
 
         ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context, 
                                                             
_edje_entry_imf_retrieve_surrounding_cb, rp);
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to