fallback: expand the range of valid keys
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 6 Oct 2020 23:36:38 +0000 (09:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 6 Oct 2020 23:38:39 +0000 (09:38 +1000)
The kernel has since added a bunch of keys in the range between
KEY_ONSCREEN_KEYBOARD and BTN_TRIGGER_HAPPY. Let's designate those as keys so
we handle them correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-fallback.h

index 0f75827e9d19912e8634029af7cf2f9eb9349a82..d1223ba5e958cbc6b6e6e1600930cf31840ba308 100644 (file)
@@ -194,7 +194,7 @@ get_key_type(uint16_t code)
                return KEY_TYPE_KEY;
        if (code >= BTN_DPAD_UP && code <= BTN_DPAD_RIGHT)
                return KEY_TYPE_BUTTON;
-       if (code >= KEY_ALS_TOGGLE && code <= KEY_ONSCREEN_KEYBOARD)
+       if (code >= KEY_ALS_TOGGLE && code < BTN_TRIGGER_HAPPY)
                return KEY_TYPE_KEY;
        if (code >= BTN_TRIGGER_HAPPY && code <= BTN_TRIGGER_HAPPY40)
                return KEY_TYPE_BUTTON;