summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-05-10 12:07:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-05-17 07:58:15 +1000
commit8527242ed9bdfc97ba248d3e36a1641213e62ca2 (patch)
tree55be14f54b81e0f2ddb5f6dff03afacee9a3c208 /src
parentfb5a97211b31853f9f680c70ba876edb1275ff5b (diff)
evdev: the range between dpad and trigger-happy are keys, not buttons
Affected keys: KEY_ALS_TOGGLE KEY_BUTTONCONFIG KEY_TASKMANAGER KEY_JOURNAL KEY_CONTROLPANEL KEY_APPSELECT KEY_SCREENSAVER KEY_VOICECOMMAND KEY_BRIGHTNESS_MIN KEY_BRIGHTNESS_MAX KEY_KBDINPUTASSIST_PREV KEY_KBDINPUTASSIST_NEXT KEY_KBDINPUTASSIST_PREVGROUP KEY_KBDINPUTASSIST_NEXTGROUP KEY_KBDINPUTASSIST_ACCEPT KEY_KBDINPUTASSIST_CANCEL https://bugs.freedesktop.org/show_bug.cgi?id=95295 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 38ac3aa7..5e41e38c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -586,7 +586,11 @@ get_key_type(uint16_t code)
return EVDEV_KEY_TYPE_BUTTON;
if (code >= KEY_OK && code <= KEY_LIGHTS_TOGGLE)
return EVDEV_KEY_TYPE_KEY;
- if (code >= BTN_DPAD_UP && code <= BTN_TRIGGER_HAPPY40)
+ if (code >= BTN_DPAD_UP && code <= BTN_DPAD_RIGHT)
+ return EVDEV_KEY_TYPE_BUTTON;
+ if (code >= KEY_ALS_TOGGLE && code <= KEY_KBDINPUTASSIST_CANCEL)
+ return EVDEV_KEY_TYPE_KEY;
+ if (code >= BTN_TRIGGER_HAPPY && code <= BTN_TRIGGER_HAPPY40)
return EVDEV_KEY_TYPE_BUTTON;
return EVDEV_KEY_TYPE_NONE;
}