summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/edje/edje_entry.c31
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c12
-rw-r--r--src/tests/elementary/elm_test_entry.c2
3 files changed, 19 insertions, 26 deletions
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 81046a3716..1ed9091b09 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1737,13 +1737,6 @@ _compose_seq_reset(Entry *en)
1737 en->composing = EINA_FALSE; 1737 en->composing = EINA_FALSE;
1738} 1738}
1739 1739
1740#define KEYCODE_A 65
1741#define KEYCODE_C 67
1742#define KEYCODE_V 86
1743#define KEYCODE_X 88
1744#define KEYCODE_Y 89
1745#define KEYCODE_Z 90
1746
1747static void 1740static void
1748_edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 1741_edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1749{ 1742{
@@ -2085,9 +2078,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2085 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2078 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
2086 } 2079 }
2087#if defined(__APPLE__) && defined(__MACH__) 2080#if defined(__APPLE__) && defined(__MACH__)
2088 else if ((super) && (!shift) && (!strcmp(ev->keyname, "v"))) 2081 else if ((super) && (!shift) && (!strcmp(ev->key, "v")))
2089#else 2082#else
2090 else if ((control) && (!shift) && (!strcmp(ev->keyname, "v"))) 2083 else if ((control) && (!shift) && (!strcmp(ev->key, "v")))
2091#endif 2084#endif
2092 { 2085 {
2093 _compose_seq_reset(en); 2086 _compose_seq_reset(en);
@@ -2096,9 +2089,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2096 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2089 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
2097 } 2090 }
2098#if defined(__APPLE__) && defined(__MACH__) 2091#if defined(__APPLE__) && defined(__MACH__)
2099 else if ((super) && (!strcmp(ev->keyname, "a") || ev->keycode == KEYCODE_A)) 2092 else if ((super) && (!strcmp(ev->key, "a")))
2100#else 2093#else
2101 else if ((control) && (!strcmp(ev->keyname, "a") || ev->keycode == KEYCODE_A)) 2094 else if ((control) && (!strcmp(ev->key, "a")))
2102#endif 2095#endif
2103 { 2096 {
2104 _compose_seq_reset(en); 2097 _compose_seq_reset(en);
@@ -2114,9 +2107,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2114 } 2107 }
2115 } 2108 }
2116#if defined(__APPLE__) && defined(__MACH__) 2109#if defined(__APPLE__) && defined(__MACH__)
2117 else if ((super) && (((!shift) && (!strcmp(ev->keyname, "c") || ev->keycode == KEYCODE_C)) || !strcmp(ev->key, "Insert"))) 2110 else if ((super) && (((!shift) && !strcmp(ev->key, "c")) || !strcmp(ev->key, "Insert")))
2118#else 2111#else
2119 else if ((control) && (((!shift) && (!strcmp(ev->keyname, "c") || ev->keycode == KEYCODE_C)) || !strcmp(ev->key, "Insert"))) 2112 else if ((control) && (((!shift) && !strcmp(ev->key, "c")) || !strcmp(ev->key, "Insert")))
2120#endif 2113#endif
2121 { 2114 {
2122 _compose_seq_reset(en); 2115 _compose_seq_reset(en);
@@ -2124,9 +2117,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2124 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2117 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
2125 } 2118 }
2126#if defined(__APPLE__) && defined(__MACH__) 2119#if defined(__APPLE__) && defined(__MACH__)
2127 else if ((super) && (!shift) && (((!strcmp(ev->keyname, "x") || ev->keycode == KEYCODE_X) || (!strcmp(ev->keyname, "m"))))) 2120 else if ((super) && (!shift) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m")))))
2128#else 2121#else
2129 else if ((control) && (!shift) && (((!strcmp(ev->keyname, "x") || ev->keycode == KEYCODE_X) || (!strcmp(ev->keyname, "m"))))) 2122 else if ((control) && (!shift) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m")))))
2130#endif 2123#endif
2131 { 2124 {
2132 _compose_seq_reset(en); 2125 _compose_seq_reset(en);
@@ -2134,9 +2127,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2134 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2127 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
2135 } 2128 }
2136#if defined(__APPLE__) && defined(__MACH__) 2129#if defined(__APPLE__) && defined(__MACH__)
2137 else if ((super) && (!strcmp(ev->keyname, "z") || ev->keycode == KEYCODE_Z)) 2130 else if ((super) && (!strcmp(ev->key, "z")))
2138#else 2131#else
2139 else if ((control) && (!strcmp(ev->keyname, "z") || ev->keycode == KEYCODE_Z)) 2132 else if ((control) && (!strcmp(ev->key, "z")))
2140#endif 2133#endif
2141 { 2134 {
2142 _compose_seq_reset(en); 2135 _compose_seq_reset(en);
@@ -2153,9 +2146,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
2153 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 2146 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
2154 } 2147 }
2155#if defined(__APPLE__) && defined(__MACH__) 2148#if defined(__APPLE__) && defined(__MACH__)
2156 else if ((super) && (!shift) && (!strcmp(ev->keyname, "y") || ev->keycode == KEYCODE_Y)) 2149 else if ((super) && (!shift) && (!strcmp(ev->key, "y")))
2157#else 2150#else
2158 else if ((control) && (!shift) && (!strcmp(ev->keyname, "y") || ev->keycode == KEYCODE_Y)) 2151 else if ((control) && (!shift) && (!strcmp(ev->key, "y")))
2159#endif 2152#endif
2160 { 2153 {
2161 _compose_seq_reset(en); 2154 _compose_seq_reset(en);
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c
index 397bbefcea..d1d374adb3 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.c
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.c
@@ -1375,9 +1375,9 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1375 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1375 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1376 } 1376 }
1377#if defined(__APPLE__) && defined(__MACH__) 1377#if defined(__APPLE__) && defined(__MACH__)
1378 else if ((super) && (!strcmp(ev->keyname, "a"))) 1378 else if ((super) && (!strcmp(ev->key, "a")))
1379#else 1379#else
1380 else if ((control) && (!strcmp(ev->keyname, "a"))) 1380 else if ((control) && (!strcmp(ev->key, "a")))
1381#endif 1381#endif
1382 { 1382 {
1383 _compose_seq_reset(en); 1383 _compose_seq_reset(en);
@@ -1393,9 +1393,9 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1393 } 1393 }
1394 } 1394 }
1395#if defined(__APPLE__) && defined(__MACH__) 1395#if defined(__APPLE__) && defined(__MACH__)
1396 else if ((super) && (!strcmp(ev->keyname, "z"))) 1396 else if ((super) && (!strcmp(ev->key, "z")))
1397#else 1397#else
1398 else if ((control) && (!strcmp(ev->keyname, "z"))) 1398 else if ((control) && (!strcmp(ev->key, "z")))
1399#endif 1399#endif
1400 { 1400 {
1401 _compose_seq_reset(en); 1401 _compose_seq_reset(en);
@@ -1412,9 +1412,9 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1412 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1412 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1413 } 1413 }
1414#if defined(__APPLE__) && defined(__MACH__) 1414#if defined(__APPLE__) && defined(__MACH__)
1415 else if ((super) && (!shift) && (!strcmp(ev->keyname, "y"))) 1415 else if ((super) && (!shift) && (!strcmp(ev->key, "y")))
1416#else 1416#else
1417 else if ((control) && (!shift) && (!strcmp(ev->keyname, "y"))) 1417 else if ((control) && (!shift) && (!strcmp(ev->key, "y")))
1418#endif 1418#endif
1419 { 1419 {
1420 _compose_seq_reset(en); 1420 _compose_seq_reset(en);
diff --git a/src/tests/elementary/elm_test_entry.c b/src/tests/elementary/elm_test_entry.c
index 93951d9e45..f3e5c1225c 100644
--- a/src/tests/elementary/elm_test_entry.c
+++ b/src/tests/elementary/elm_test_entry.c
@@ -622,7 +622,7 @@ EFL_START_TEST(elm_entry_keycode)
622 Evas *e = evas_object_evas_get(entry); 622 Evas *e = evas_object_evas_get(entry);
623 elm_object_focus_set(entry, EINA_TRUE); 623 elm_object_focus_set(entry, EINA_TRUE);
624 evas_key_modifier_on(e, "Control"); 624 evas_key_modifier_on(e, "Control");
625 evas_event_feed_key_down_with_keycode(e, "", "", "", "", time(NULL), NULL, 65); 625 evas_event_feed_key_down_with_keycode(e, "", "a", "", "", time(NULL), NULL, 38);
626 ecore_main_loop_iterate(); 626 ecore_main_loop_iterate();
627 evas_event_feed_key_down(e, "BackSpace", "BackSpace", "\b", "\b", time(NULL), NULL); 627 evas_event_feed_key_down(e, "BackSpace", "BackSpace", "\b", "\b", time(NULL), NULL);
628 ck_assert_str_eq(elm_object_text_get(entry), ""); 628 ck_assert_str_eq(elm_object_text_get(entry), "");