Loading include/android/keycodes.h +11 −0 Original line number Diff line number Diff line Loading @@ -818,6 +818,17 @@ enum { /** 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. Loading libs/input/InputEventLabels.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ namespace android { // clang-format off // 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. #define KEYCODES_SEQUENCE \ Loading Loading @@ -333,7 +335,11 @@ namespace android { DEFINE_KEYCODE(DEMO_APP_4), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_DOWN), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_UP), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_TOGGLE) DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_TOGGLE), \ DEFINE_KEYCODE(STYLUS_BUTTON_PRIMARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_SECONDARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_TERTIARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_TAIL) // NOTE: If you add a new axis here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. Loading Loading @@ -387,7 +393,6 @@ namespace android { DEFINE_AXIS(GENERIC_15), \ DEFINE_AXIS(GENERIC_16) // NOTE: If you add new LEDs here, you must also add them to Input.h #define LEDS_SEQUENCE \ DEFINE_LED(NUM_LOCK), \ Loading @@ -412,6 +417,8 @@ namespace android { DEFINE_FLAG(GESTURE), \ DEFINE_FLAG(WAKE) // clang-format on // --- InputEventLookup --- const std::unordered_map<std::string, int> InputEventLookup::KEYCODES = {KEYCODES_SEQUENCE}; Loading Loading
include/android/keycodes.h +11 −0 Original line number Diff line number Diff line Loading @@ -818,6 +818,17 @@ enum { /** 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. Loading
libs/input/InputEventLabels.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ namespace android { // clang-format off // 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. #define KEYCODES_SEQUENCE \ Loading Loading @@ -333,7 +335,11 @@ namespace android { DEFINE_KEYCODE(DEMO_APP_4), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_DOWN), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_UP), \ DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_TOGGLE) DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_TOGGLE), \ DEFINE_KEYCODE(STYLUS_BUTTON_PRIMARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_SECONDARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_TERTIARY), \ DEFINE_KEYCODE(STYLUS_BUTTON_TAIL) // NOTE: If you add a new axis here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. Loading Loading @@ -387,7 +393,6 @@ namespace android { DEFINE_AXIS(GENERIC_15), \ DEFINE_AXIS(GENERIC_16) // NOTE: If you add new LEDs here, you must also add them to Input.h #define LEDS_SEQUENCE \ DEFINE_LED(NUM_LOCK), \ Loading @@ -412,6 +417,8 @@ namespace android { DEFINE_FLAG(GESTURE), \ DEFINE_FLAG(WAKE) // clang-format on // --- InputEventLookup --- const std::unordered_map<std::string, int> InputEventLookup::KEYCODES = {KEYCODES_SEQUENCE}; Loading