summaryrefslogtreecommitdiff
path: root/include/input/InputEventLabels.h
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2023-07-21 18:31:00 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2023-07-28 00:56:00 +0000
commit2f13e022e739737f0a6cc4a31c6bcbb4cdadf387 (patch)
tree35492a47a034d2c3d085615eeef990588dd8e5ef /include/input/InputEventLabels.h
parent1030142fbc887c564bb6165946d06ccf43dd9591 (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.h6
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();