summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/ecore_imf/Ecore_IMF.h2
-rw-r--r--src/lib/edje/edje_entry.c86
3 files changed, 48 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index e072762aea..637fa0d3e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-07-31 Carsten Haitzler (The Rasterman)
2
3 * Fix efl to use key not keyname (so xmodmap works).
4
12013-07-31 Cedric Bail 52013-07-31 Cedric Bail
2 6
3 * Eina: add eina_file_virtualize() and eina_file_virtual(). 7 * Eina: add eina_file_virtualize() and eina_file_virtual().
diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h
index 842b8fca3c..669e39a9e0 100644
--- a/src/lib/ecore_imf/Ecore_IMF.h
+++ b/src/lib/ecore_imf/Ecore_IMF.h
@@ -943,7 +943,7 @@ EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get(Ecore_IMF_Co
943 * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) 943 * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
944 * { 944 * {
945 * Evas_Event_Key_Down *ev = event_info; 945 * Evas_Event_Key_Down *ev = event_info;
946 * if (!ev->keyname) return; 946 * if (!ev->key) return;
947 * 947 *
948 * if (imf_context) 948 * if (imf_context)
949 * { 949 * {
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index d25329d244..159a2b471a 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1487,7 +1487,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1487 if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || 1487 if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
1488 (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE)) 1488 (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_EDITABLE))
1489 return; 1489 return;
1490 if (!ev->keyname) return; 1490 if (!ev->key) return;
1491 1491
1492 _edje_emit(ed, "entry,keydown", rp->part->name); 1492 _edje_emit(ed, "entry,keydown", rp->part->name);
1493#ifdef HAVE_ECORE_IMF 1493#ifdef HAVE_ECORE_IMF
@@ -1504,18 +1504,18 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1504 1504
1505 if (en->have_preedit) 1505 if (en->have_preedit)
1506 { 1506 {
1507 if (!strcmp(ev->keyname, "Down") || 1507 if (!strcmp(ev->key, "Down") ||
1508 (!strcmp(ev->keyname, "KP_Down") && !ev->string) || 1508 (!strcmp(ev->key, "KP_Down") && !ev->string) ||
1509 !strcmp(ev->keyname, "Up") || 1509 !strcmp(ev->key, "Up") ||
1510 (!strcmp(ev->keyname, "KP_Up") && !ev->string) || 1510 (!strcmp(ev->key, "KP_Up") && !ev->string) ||
1511 !strcmp(ev->keyname, "Next") || 1511 !strcmp(ev->key, "Next") ||
1512 (!strcmp(ev->keyname, "KP_Next") && !ev->string) || 1512 (!strcmp(ev->key, "KP_Next") && !ev->string) ||
1513 !strcmp(ev->keyname, "Prior") || 1513 !strcmp(ev->key, "Prior") ||
1514 (!strcmp(ev->keyname, "KP_Prior") && !ev->string) || 1514 (!strcmp(ev->key, "KP_Prior") && !ev->string) ||
1515 !strcmp(ev->keyname, "Home") || 1515 !strcmp(ev->key, "Home") ||
1516 (!strcmp(ev->keyname, "KP_Home") && !ev->string) || 1516 (!strcmp(ev->key, "KP_Home") && !ev->string) ||
1517 !strcmp(ev->keyname, "End") || 1517 !strcmp(ev->key, "End") ||
1518 (!strcmp(ev->keyname, "KP_End") && !ev->string)) 1518 (!strcmp(ev->key, "KP_End") && !ev->string))
1519 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1519 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1520 } 1520 }
1521 1521
@@ -1532,15 +1532,15 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1532 shift = evas_key_modifier_is_set(ev->modifiers, "Shift"); 1532 shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
1533 multiline = rp->part->multiline; 1533 multiline = rp->part->multiline;
1534 cursor_changed = EINA_FALSE; 1534 cursor_changed = EINA_FALSE;
1535 if (!strcmp(ev->keyname, "Escape")) 1535 if (!strcmp(ev->key, "Escape"))
1536 { 1536 {
1537 _compose_seq_reset(en); 1537 _compose_seq_reset(en);
1538 // dead keys here. Escape for now (should emit these) 1538 // dead keys here. Escape for now (should emit these)
1539 _edje_emit(ed, "entry,key,escape", rp->part->name); 1539 _edje_emit(ed, "entry,key,escape", rp->part->name);
1540 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1540 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1541 } 1541 }
1542 else if (!strcmp(ev->keyname, "Up") || 1542 else if (!strcmp(ev->key, "Up") ||
1543 (!strcmp(ev->keyname, "KP_Up") && !ev->string)) 1543 (!strcmp(ev->key, "KP_Up") && !ev->string))
1544 { 1544 {
1545 _compose_seq_reset(en); 1545 _compose_seq_reset(en);
1546 if (multiline) 1546 if (multiline)
@@ -1568,8 +1568,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1568 _edje_emit(ed, "entry,key,up", rp->part->name); 1568 _edje_emit(ed, "entry,key,up", rp->part->name);
1569 _edje_emit(ed, "cursor,changed,manual", rp->part->name); 1569 _edje_emit(ed, "cursor,changed,manual", rp->part->name);
1570 } 1570 }
1571 else if (!strcmp(ev->keyname, "Down") || 1571 else if (!strcmp(ev->key, "Down") ||
1572 (!strcmp(ev->keyname, "KP_Down") && !ev->string)) 1572 (!strcmp(ev->key, "KP_Down") && !ev->string))
1573 { 1573 {
1574 _compose_seq_reset(en); 1574 _compose_seq_reset(en);
1575 if (multiline) 1575 if (multiline)
@@ -1597,8 +1597,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1597 _edje_emit(ed, "entry,key,down", rp->part->name); 1597 _edje_emit(ed, "entry,key,down", rp->part->name);
1598 _edje_emit(ed, "cursor,changed,manual", rp->part->name); 1598 _edje_emit(ed, "cursor,changed,manual", rp->part->name);
1599 } 1599 }
1600 else if (!strcmp(ev->keyname, "Left") || 1600 else if (!strcmp(ev->key, "Left") ||
1601 (!strcmp(ev->keyname, "KP_Left") && !ev->string)) 1601 (!strcmp(ev->key, "KP_Left") && !ev->string))
1602 { 1602 {
1603 _compose_seq_reset(en); 1603 _compose_seq_reset(en);
1604 if (en->have_selection && 1604 if (en->have_selection &&
@@ -1625,8 +1625,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1625 _edje_emit(ed, "entry,key,left", rp->part->name); 1625 _edje_emit(ed, "entry,key,left", rp->part->name);
1626 _edje_emit(ed, "cursor,changed,manual", rp->part->name); 1626 _edje_emit(ed, "cursor,changed,manual", rp->part->name);
1627 } 1627 }
1628 else if (!strcmp(ev->keyname, "Right") || 1628 else if (!strcmp(ev->key, "Right") ||
1629 (!strcmp(ev->keyname, "KP_Right") && !ev->string)) 1629 (!strcmp(ev->key, "KP_Right") && !ev->string))
1630 { 1630 {
1631 _compose_seq_reset(en); 1631 _compose_seq_reset(en);
1632 if (en->have_selection && 1632 if (en->have_selection &&
@@ -1653,7 +1653,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1653 _edje_emit(ed, "entry,key,right", rp->part->name); 1653 _edje_emit(ed, "entry,key,right", rp->part->name);
1654 _edje_emit(ed, "cursor,changed,manual", rp->part->name); 1654 _edje_emit(ed, "cursor,changed,manual", rp->part->name);
1655 } 1655 }
1656 else if (!strcmp(ev->keyname, "BackSpace")) 1656 else if (!strcmp(ev->key, "BackSpace"))
1657 { 1657 {
1658 _compose_seq_reset(en); 1658 _compose_seq_reset(en);
1659 if (control && !en->have_selection) 1659 if (control && !en->have_selection)
@@ -1691,8 +1691,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1691 _edje_emit(ed, "entry,key,backspace", rp->part->name); 1691 _edje_emit(ed, "entry,key,backspace", rp->part->name);
1692 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1692 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1693 } 1693 }
1694 else if (!strcmp(ev->keyname, "Delete") || 1694 else if (!strcmp(ev->key, "Delete") ||
1695 (!strcmp(ev->keyname, "KP_Delete") && !ev->string)) 1695 (!strcmp(ev->key, "KP_Delete") && !ev->string))
1696 { 1696 {
1697 _compose_seq_reset(en); 1697 _compose_seq_reset(en);
1698 if (control) 1698 if (control)
@@ -1728,8 +1728,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1728 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1728 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1729 } 1729 }
1730 else if ((!alt) && 1730 else if ((!alt) &&
1731 (!strcmp(ev->keyname, "Home") || 1731 (!strcmp(ev->key, "Home") ||
1732 ((!strcmp(ev->keyname, "KP_Home")) && !ev->string))) 1732 ((!strcmp(ev->key, "KP_Home")) && !ev->string)))
1733 { 1733 {
1734 _compose_seq_reset(en); 1734 _compose_seq_reset(en);
1735 if (en->select_allow) 1735 if (en->select_allow)
@@ -1749,8 +1749,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1749 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1749 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1750 } 1750 }
1751 else if ((!alt) && 1751 else if ((!alt) &&
1752 (!strcmp(ev->keyname, "End") || 1752 (!strcmp(ev->key, "End") ||
1753 ((!strcmp(ev->keyname, "KP_End")) && !ev->string))) 1753 ((!strcmp(ev->key, "KP_End")) && !ev->string)))
1754 { 1754 {
1755 _compose_seq_reset(en); 1755 _compose_seq_reset(en);
1756 if (en->select_allow) 1756 if (en->select_allow)
@@ -1769,14 +1769,14 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1769 _edje_emit(ed, "entry,key,end", rp->part->name); 1769 _edje_emit(ed, "entry,key,end", rp->part->name);
1770 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1770 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1771 } 1771 }
1772 else if ((control) && (!shift) && (!strcmp(ev->keyname, "v"))) 1772 else if ((control) && (!shift) && (!strcmp(ev->key, "v")))
1773 { 1773 {
1774 _compose_seq_reset(en); 1774 _compose_seq_reset(en);
1775 _edje_emit(ed, "entry,paste,request", rp->part->name); 1775 _edje_emit(ed, "entry,paste,request", rp->part->name);
1776 _edje_emit(ed, "entry,paste,request,3", rp->part->name); 1776 _edje_emit(ed, "entry,paste,request,3", rp->part->name);
1777 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1777 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1778 } 1778 }
1779 else if ((control) && (!strcmp(ev->keyname, "a"))) 1779 else if ((control) && (!strcmp(ev->key, "a")))
1780 { 1780 {
1781 _compose_seq_reset(en); 1781 _compose_seq_reset(en);
1782 if (shift) 1782 if (shift)
@@ -1790,19 +1790,19 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1790 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1790 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1791 } 1791 }
1792 } 1792 }
1793 else if ((control) && (((!shift) && !strcmp(ev->keyname, "c")) || !strcmp(ev->keyname, "Insert"))) 1793 else if ((control) && (((!shift) && !strcmp(ev->key, "c")) || !strcmp(ev->key, "Insert")))
1794 { 1794 {
1795 _compose_seq_reset(en); 1795 _compose_seq_reset(en);
1796 _edje_emit(ed, "entry,copy,notify", rp->part->name); 1796 _edje_emit(ed, "entry,copy,notify", rp->part->name);
1797 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1797 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1798 } 1798 }
1799 else if ((control) && (!shift) && ((!strcmp(ev->keyname, "x") || (!strcmp(ev->keyname, "m"))))) 1799 else if ((control) && (!shift) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m")))))
1800 { 1800 {
1801 _compose_seq_reset(en); 1801 _compose_seq_reset(en);
1802 _edje_emit(ed, "entry,cut,notify", rp->part->name); 1802 _edje_emit(ed, "entry,cut,notify", rp->part->name);
1803 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1803 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1804 } 1804 }
1805 else if ((control) && (!strcmp(ev->keyname, "z"))) 1805 else if ((control) && (!strcmp(ev->key, "z")))
1806 { 1806 {
1807 _compose_seq_reset(en); 1807 _compose_seq_reset(en);
1808 if (shift) 1808 if (shift)
@@ -1817,21 +1817,21 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1817 } 1817 }
1818 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1818 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1819 } 1819 }
1820 else if ((control) && (!shift) && (!strcmp(ev->keyname, "y"))) 1820 else if ((control) && (!shift) && (!strcmp(ev->key, "y")))
1821 { 1821 {
1822 _compose_seq_reset(en); 1822 _compose_seq_reset(en);
1823 // redo 1823 // redo
1824 _edje_emit(ed, "entry,redo,request", rp->part->name); 1824 _edje_emit(ed, "entry,redo,request", rp->part->name);
1825 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1825 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1826 } 1826 }
1827 else if ((control) && (!shift) && (!strcmp(ev->keyname, "w"))) 1827 else if ((control) && (!shift) && (!strcmp(ev->key, "w")))
1828 { 1828 {
1829 _compose_seq_reset(en); 1829 _compose_seq_reset(en);
1830 _sel_clear(ed, en->cursor, rp->object, en); 1830 _sel_clear(ed, en->cursor, rp->object, en);
1831 // select current word? 1831 // select current word?
1832 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1832 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1833 } 1833 }
1834 else if (!strcmp(ev->keyname, "Tab")) 1834 else if (!strcmp(ev->key, "Tab"))
1835 { 1835 {
1836 _compose_seq_reset(en); 1836 _compose_seq_reset(en);
1837 if (multiline) 1837 if (multiline)
@@ -1864,14 +1864,14 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1864 } 1864 }
1865 _edje_emit(ed, "entry,key,tab", rp->part->name); 1865 _edje_emit(ed, "entry,key,tab", rp->part->name);
1866 } 1866 }
1867 else if ((!strcmp(ev->keyname, "ISO_Left_Tab")) && (multiline)) 1867 else if ((!strcmp(ev->key, "ISO_Left_Tab")) && (multiline))
1868 { 1868 {
1869 _compose_seq_reset(en); 1869 _compose_seq_reset(en);
1870 // remove a tab 1870 // remove a tab
1871 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1871 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1872 } 1872 }
1873 else if (!strcmp(ev->keyname, "Prior") || 1873 else if (!strcmp(ev->key, "Prior") ||
1874 (!strcmp(ev->keyname, "KP_Prior") && !ev->string)) 1874 (!strcmp(ev->key, "KP_Prior") && !ev->string))
1875 { 1875 {
1876 _compose_seq_reset(en); 1876 _compose_seq_reset(en);
1877 if (en->select_allow) 1877 if (en->select_allow)
@@ -1888,8 +1888,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1888 _edje_emit(ed, "entry,key,pgup", rp->part->name); 1888 _edje_emit(ed, "entry,key,pgup", rp->part->name);
1889 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1889 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1890 } 1890 }
1891 else if (!strcmp(ev->keyname, "Next") || 1891 else if (!strcmp(ev->key, "Next") ||
1892 (!strcmp(ev->keyname, "KP_Next") && !ev->string)) 1892 (!strcmp(ev->key, "KP_Next") && !ev->string))
1893 { 1893 {
1894 _compose_seq_reset(en); 1894 _compose_seq_reset(en);
1895 if (en->select_allow) 1895 if (en->select_allow)
@@ -1906,7 +1906,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1906 _edje_emit(ed, "entry,key,pgdn", rp->part->name); 1906 _edje_emit(ed, "entry,key,pgdn", rp->part->name);
1907 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; 1907 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
1908 } 1908 }
1909 else if ((!strcmp(ev->keyname, "Return")) || (!strcmp(ev->keyname, "KP_Enter"))) 1909 else if ((!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter")))
1910 { 1910 {
1911 _compose_seq_reset(en); 1911 _compose_seq_reset(en);
1912 if (multiline) 1912 if (multiline)