]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
input: index_from_key(): drop unused code
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 20 Sep 2012 17:47:02 +0000 (14:47 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 27 Sep 2012 12:50:36 +0000 (09:50 -0300)
The hex key conversion is unused since last commit.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
input.c

diff --git a/input.c b/input.c
index 76ade64d044f438d2a65b0ca327049a4ff440cbb..25d3973e214ad71fd3f49bcbcf1f95e51dc9a6b8 100644 (file)
--- a/input.c
+++ b/input.c
@@ -186,8 +186,7 @@ static const int key_defs[] = {
 
 int index_from_key(const char *key)
 {
-    int i, keycode;
-    char *endp;
+    int i;
 
     for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
         if (!strcmp(key, QKeyCode_lookup[i])) {
@@ -195,17 +194,6 @@ int index_from_key(const char *key)
         }
     }
 
-    if (strstart(key, "0x", NULL)) {
-        keycode = strtoul(key, &endp, 0);
-        if (*endp == '\0' && keycode >= 0x01 && keycode <= 0xff) {
-            for (i = 0; i < Q_KEY_CODE_MAX; i++) {
-                if (keycode == key_defs[i]) {
-                    break;
-                }
-            }
-        }
-    }
-
     /* Return Q_KEY_CODE_MAX if the key is invalid */
     return i;
 }