ecore_cocoa: switch keys to map correctly on OS-X.
authorNicolas Aguirre <aguirre.nicolas@gmail.com>
Sat, 11 Jan 2014 09:23:50 +0000 (10:23 +0100)
committerCedric BAIL <c.bail@partner.samsung.com>
Wed, 18 Jun 2014 09:34:07 +0000 (11:34 +0200)
os-x is notoriously switching the meaning of those keys
calling "BackSpace" "Delete, and "Delete" "Forward Delete"

Original patch by Pierre Tardy

src/lib/ecore_cocoa/Ecore_Cocoa_Keys.h

index 7068bc2..f238df2 100644 (file)
@@ -14,7 +14,8 @@ static const struct _ecore_cocoa_keys_s keystable[] =
 { 0,                         "0x00",         "" },
 { 0,                         "First",        "" },
 { 3,                         "Return",       "\015" },
-{ 8,                         "BackSpace",    "\010" },
+// OS-X's backspace and Delete are reversed!
+{ 8,                         "Delete",    "\010" },
 { 9,                         "Tab",          "\011" },
 { 12,                        "Clear",        "" },
 { 13,                        "Return",       "\015" },
@@ -90,10 +91,11 @@ static const struct _ecore_cocoa_keys_s keystable[] =
 { 123,                       "braceleft",    "" },
 { 124,                       "pipe",         "" },
 { 125,                       "braceright",   "" },
-{ 127,                       "Delete",       "\177" },
+// OS-X's backspace and Delete are reversed!
+{ 127,                       "BackSpace",       "\177" },
 { 126,                       "asciitilde",   "~" },
 
-{ 160,                       "w0",           "" }, 
+{ 160,                       "w0",           "" },
 { 161,                       "w1",           "" },
 { 162,                       "w2",           "" },
 { 163,                       "w3",           "" },