Add Android keycodes for stylus buttons
Ensure the new stylus buttons are not yet sent to apps.
DD: go/android-stylus-buttons
Bug: 246394583
Test: Build, Presubmit
Change-Id: I3f429c3435c90429c908fb77f8dbf964290d47aa
diff --git a/include/android/keycodes.h b/include/android/keycodes.h
index 16a13d6..e5b5db2 100644
--- a/include/android/keycodes.h
+++ b/include/android/keycodes.h
@@ -818,6 +818,17 @@
/** Keyboard backlight Toggle key.
* Toggles the keyboard backlight on/off. */
AKEYCODE_KEYBOARD_BACKLIGHT_TOGGLE = 307,
+ /** The primary button on the barrel of a stylus.
+ * This is usually the button closest to the tip of the stylus. */
+ AKEYCODE_STYLUS_BUTTON_PRIMARY = 308,
+ /** The secondary button on the barrel of a stylus.
+ * This is usually the second button from the tip of the stylus. */
+ AKEYCODE_STYLUS_BUTTON_SECONDARY = 309,
+ /** The tertiary button on the barrel of a stylus.
+ * This is usually the third button from the tip of the stylus. */
+ AKEYCODE_STYLUS_BUTTON_TERTIARY = 310,
+ /** A button on the tail end of a stylus. */
+ AKEYCODE_STYLUS_BUTTON_TAIL = 311,
// NOTE: If you add a new keycode here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.