summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabir Pradhan <prabirmsp@google.com>2023-08-22 23:11:38 +0000
committerSzuWei Lin <szuweilin@google.com>2023-11-30 10:49:20 +0800
commit684f2d452de74fecdf4c500a3f44fa5c40e67939 (patch)
tree536c91fde22b4ae950c779d7fd10c8ca759ec0a1
parent006f5b8cb92c60de0424a4d69d62c21a02e7ad91 (diff)
downloadbase-684f2d452de74fecdf4c500a3f44fa5c40e67939.tar.gz
Remove HID usage mapping for stylus buttons in Generic.kl
... until we figure out a way to determine if a device supports a specific HID usage code. Right now, having a usage code mapping means we automatically assume the device can report the key code. Assuming a device can support a stylus keycode makes the device get classified as a stylus, leading to widespread misclassifications. Bug: 291529805 Test: atest inputflinger_tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5fb192aaec7a1d4ebb1384d96b3f79d4b2ca2f2c) Merged-In: I580514bdcbbfbe93df83fa3faa6262077e881243 Change-Id: I580514bdcbbfbe93df83fa3faa6262077e881243
-rw-r--r--data/keyboards/Generic.kl6
1 files changed, 4 insertions, 2 deletions
diff --git a/data/keyboards/Generic.kl b/data/keyboards/Generic.kl
index e27cd978e6be..31092536bac5 100644
--- a/data/keyboards/Generic.kl
+++ b/data/keyboards/Generic.kl
@@ -439,8 +439,10 @@ key usage 0x0c007C KEYBOARD_BACKLIGHT_TOGGLE
key usage 0x0c0173 MEDIA_AUDIO_TRACK
key usage 0x0c019C PROFILE_SWITCH
key usage 0x0c01A2 ALL_APPS
-key usage 0x0d0044 STYLUS_BUTTON_PRIMARY
-key usage 0x0d005a STYLUS_BUTTON_SECONDARY
+# TODO(b/297094448): Add stylus button mappings as a fallback when we have a way to determine
+# if a device can actually report it.
+# key usage 0x0d0044 STYLUS_BUTTON_PRIMARY
+# key usage 0x0d005a STYLUS_BUTTON_SECONDARY
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.