diff options
| author | 2023-07-21 18:31:00 +0000 | |
|---|---|---|
| committer | 2023-07-28 00:56:00 +0000 | |
| commit | 2f13e022e739737f0a6cc4a31c6bcbb4cdadf387 (patch) | |
| tree | 35492a47a034d2c3d085615eeef990588dd8e5ef /include/input/InputEventLabels.h | |
| parent | 1030142fbc887c564bb6165946d06ccf43dd9591 (diff) | |
InputEventLabels: Support lookup of evdev event codes by label
Bug: 293327283
Test: atest CtsInputTestCases
Change-Id: I846e1dc1eb450ea92d35ac7e403b06e2a029f25b
Diffstat (limited to 'include/input/InputEventLabels.h')
| -rw-r--r-- | include/input/InputEventLabels.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h index 909bf087dd..44247c1249 100644 --- a/include/input/InputEventLabels.h +++ b/include/input/InputEventLabels.h @@ -69,6 +69,12 @@ public: static EvdevEventLabel getLinuxEvdevLabel(int32_t type, int32_t code, int32_t value); + static std::optional<int> getLinuxEvdevEventTypeByLabel(const char* label); + + static std::optional<int> getLinuxEvdevEventCodeByLabel(int32_t type, const char* label); + + static std::optional<int> getLinuxEvdevInputPropByLabel(const char* label); + private: InputEventLookup(); |