diff options
| author | 2023-09-26 10:11:34 +0000 | |
|---|---|---|
| committer | 2023-10-02 13:55:43 +0000 | |
| commit | b2aff84fcf453b4524bbd4c628d00ae0f0d93f4c (patch) | |
| tree | 8bad5d91eb7ca2aa4a9ae928ae8df0002be92d3e /include/input/Input.h | |
| parent | 9e8407669e0b419379c60341c604e36cd4be5f9e (diff) | |
Add flag to mark key usage code as a fallback mapping
We don't yet have a way to determine if a device can actually report a
usage code. Adding a flag to mark usage code as fallback only mapping.
Bug: 297094448
Test: atest inputflinger_tests
Change-Id: I137113d0dc9a1c8abf523b96942486be176d0240
Diffstat (limited to 'include/input/Input.h')
| -rw-r--r-- | include/input/Input.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/input/Input.h b/include/input/Input.h index 64ee47342d..567361d679 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -285,6 +285,16 @@ enum { // This policy flag prevents key events from changing touch mode state. POLICY_FLAG_GESTURE = 0x00000008, + // Indicates that key usage mapping represents a fallback mapping. + // Fallback mappings cannot be used to definitively determine whether a device + // supports a key code. For example, a HID device can report a key press + // as a HID usage code if it is not mapped to any linux key code in the kernel. + // However, we cannot know which HID usage codes that device supports from + // userspace through the evdev. We can use fallback mappings to convert HID + // usage codes to Android key codes without needing to know if a device can + // actually report the usage code. + POLICY_FLAG_FALLBACK_USAGE_MAPPING = 0x00000010, + POLICY_FLAG_RAW_MASK = 0x0000ffff, #ifdef __linux__ |