diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2012-09-20 14:47:02 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-09-27 09:50:36 -0300 |
commit | 9d537c9019e6a05713b44900c78447a0cfb06567 (patch) | |
tree | 047a6caf98d160ac2fb2d4bac079489e1093489c | |
parent | 9f32897768064841fe9a99145c9d15ab6667ffed (diff) |
input: index_from_key(): drop unused code
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>
-rw-r--r-- | input.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -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; } |