提交 9d537c90 编写于 作者: L Luiz Capitulino

input: index_from_key(): drop unused code

The hex key conversion is unused since last commit.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
上级 9f328977
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册