Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf875ab2 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Add new native keycodes for keyboard backlight up/down/toggle

Also syncing all the keycodes in KeyEvents.java file to here for consistency.

Test: None
Bug: 245506418
Change-Id: I40c0b6f7d0e67ffc1ee01c6cb1dfbcfc96b37d62
parent 877689ff
Loading
Loading
Loading
Loading
+42 −1
Original line number Diff line number Diff line
@@ -776,7 +776,48 @@ enum {
    AKEYCODE_THUMBS_DOWN = 287,
    /** Used to switch current account that is consuming content.
     * May be consumed by system to switch current viewer profile. */
    AKEYCODE_PROFILE_SWITCH = 288
    AKEYCODE_PROFILE_SWITCH = 288,
    /** Video Application key #1. */
    AKEYCODE_VIDEO_APP_1 = 289,
    /** Video Application key #2. */
    AKEYCODE_VIDEO_APP_2 = 290,
    /** Video Application key #3. */
    AKEYCODE_VIDEO_APP_3 = 291,
    /** Video Application key #4. */
    AKEYCODE_VIDEO_APP_4 = 292,
    /** Video Application key #5. */
    AKEYCODE_VIDEO_APP_5 = 293,
    /** Video Application key #6. */
    AKEYCODE_VIDEO_APP_6 = 294,
    /** Video Application key #7. */
    AKEYCODE_VIDEO_APP_7 = 295,
    /** Video Application key #8. */
    AKEYCODE_VIDEO_APP_8 = 296,
    /** Featured Application key #1. */
    AKEYCODE_FEATURED_APP_1 = 297,
    /** Featured Application key #2. */
    AKEYCODE_FEATURED_APP_2 = 298,
    /** Featured Application key #3. */
    AKEYCODE_FEATURED_APP_3 = 299,
    /** Featured Application key #4. */
    AKEYCODE_FEATURED_APP_4 = 300,
    /** Demo Application key #1. */
    AKEYCODE_DEMO_APP_1 = 301,
    /** Demo Application key #2. */
    AKEYCODE_DEMO_APP_2 = 302,
    /** Demo Application key #3. */
    AKEYCODE_DEMO_APP_3 = 303,
    /** Demo Application key #4. */
    AKEYCODE_DEMO_APP_4 = 304,
    /** Keyboard backlight Down key.
     * Adjusts the keyboard backlight brightness down. */
    AKEYCODE_KEYBOARD_BACKLIGHT_DOWN = 305,
    /** Keyboard backlight Up key.
     * Adjusts the keyboard backlight brightness up. */
    AKEYCODE_KEYBOARD_BACKLIGHT_UP = 306,
    /** Keyboard backlight Toggle key.
     * Toggles the keyboard backlight on/off. */
    AKEYCODE_KEYBOARD_BACKLIGHT_TOGGLE = 307,

    // 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.
+20 −1
Original line number Diff line number Diff line
@@ -314,7 +314,26 @@ namespace android {
    DEFINE_KEYCODE(REFRESH), \
    DEFINE_KEYCODE(THUMBS_UP), \
    DEFINE_KEYCODE(THUMBS_DOWN), \
    DEFINE_KEYCODE(PROFILE_SWITCH)
    DEFINE_KEYCODE(PROFILE_SWITCH), \
    DEFINE_KEYCODE(VIDEO_APP_1), \
    DEFINE_KEYCODE(VIDEO_APP_2), \
    DEFINE_KEYCODE(VIDEO_APP_3), \
    DEFINE_KEYCODE(VIDEO_APP_4), \
    DEFINE_KEYCODE(VIDEO_APP_5), \
    DEFINE_KEYCODE(VIDEO_APP_6), \
    DEFINE_KEYCODE(VIDEO_APP_7), \
    DEFINE_KEYCODE(VIDEO_APP_8), \
    DEFINE_KEYCODE(FEATURED_APP_1), \
    DEFINE_KEYCODE(FEATURED_APP_2), \
    DEFINE_KEYCODE(FEATURED_APP_3), \
    DEFINE_KEYCODE(FEATURED_APP_4), \
    DEFINE_KEYCODE(DEMO_APP_1), \
    DEFINE_KEYCODE(DEMO_APP_2), \
    DEFINE_KEYCODE(DEMO_APP_3), \
    DEFINE_KEYCODE(DEMO_APP_4), \
    DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_DOWN), \
    DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_UP), \
    DEFINE_KEYCODE(KEYBOARD_BACKLIGHT_TOGGLE)

// 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.