billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=a3492b980f162adf7a3bb6cc5406c1b2df6b2a63

commit a3492b980f162adf7a3bb6cc5406c1b2df6b2a63
Author: Boris Faure <bill...@gmail.com>
Date:   Sat Jun 21 14:54:48 2014 +0200

    add ISO_Level3_Left to _is_modifier()
---
 src/bin/termio.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index bf58da0..95671f3 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1974,21 +1974,23 @@ _smart_cb_key_up(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
           return;
      }
 }
-
 static Eina_Bool
 _is_modifier(const char *key)
 {
+#define STATIC_STR_EQUAL(STR) (!strncmp(key, STR, strlen(STR)))
    if ((key != NULL) && (
-       (!strncmp(key, "Shift", 5)) ||
-       (!strncmp(key, "Control", 7)) ||
-       (!strncmp(key, "Alt", 3)) ||
-       (!strncmp(key, "Meta", 4)) ||
-       (!strncmp(key, "Super", 5)) ||
-       (!strncmp(key, "Hyper", 5)) ||
-       (!strcmp(key, "Scroll_Lock")) ||
-       (!strcmp(key, "Num_Lock")) ||
-       (!strcmp(key, "Caps_Lock"))))
+       STATIC_STR_EQUAL("Shift") ||
+       STATIC_STR_EQUAL("Control") ||
+       STATIC_STR_EQUAL("Alt") ||
+       STATIC_STR_EQUAL("Meta") ||
+       STATIC_STR_EQUAL("Super") ||
+       STATIC_STR_EQUAL("Hyper") ||
+       STATIC_STR_EQUAL("Scroll_Lock") ||
+       STATIC_STR_EQUAL("Num_Lock") ||
+       STATIC_STR_EQUAL("ISO_Level3_Shift") ||
+       STATIC_STR_EQUAL("Caps_Lock")))
      return EINA_TRUE;
+#undef STATIC_STR_EQUAL
    return EINA_FALSE;
 }
 

-- 


Reply via email to