fallback: expand the range of valid keys

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>
(cherry picked from commit a80fe32503)
This commit is contained in:
Peter Hutterer 2020-10-07 09:36:38 +10:00
parent c6ab679fef
commit 2b632541db

View 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;