aboutsummaryrefslogtreecommitdiff
path: root/ui/input-legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/input-legacy.c')
-rw-r--r--ui/input-legacy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 7159747..6bc3525 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -61,9 +61,9 @@ int index_from_key(const char *key, size_t key_length)
{
int i;
- for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
- if (!strncmp(key, QKeyCode_lookup[i], key_length) &&
- !QKeyCode_lookup[i][key_length]) {
+ for (i = 0; i < Q_KEY_CODE__MAX; i++) {
+ if (!strncmp(key, QKeyCode_str(i), key_length) &&
+ !QKeyCode_str(i)[key_length]) {
break;
}
}