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

Commit ee7d82a2 authored by Alexander Hofbauer's avatar Alexander Hofbauer
Browse files

Implement additional keycodes

Adds keys for

*) WLAN, Bluetooth, touchpad toggle,
*) brightness down, up, auto and
*) screenshot

as found on docks of current Asus Transformer devices.

Change-Id: I5fa143da3786eaebc1fc2d630bcdccd699256a82
parent 00cd27f6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -23250,6 +23250,9 @@ package android.view {
    field public static final int KEYCODE_BACKSLASH = 73; // 0x49
    field public static final int KEYCODE_BOOKMARK = 174; // 0xae
    field public static final int KEYCODE_BREAK = 121; // 0x79
    field public static final int KEYCODE_BRIGHTNESS_AUTO = 225; // 0xe1
    field public static final int KEYCODE_BRIGHTNESS_DOWN = 223; // 0xdf
    field public static final int KEYCODE_BRIGHTNESS_UP = 224; // 0xe0
    field public static final int KEYCODE_BUTTON_1 = 188; // 0xbc
    field public static final int KEYCODE_BUTTON_10 = 197; // 0xc5
    field public static final int KEYCODE_BUTTON_11 = 198; // 0xc6
@@ -23409,6 +23412,7 @@ package android.view {
    field public static final int KEYCODE_RIGHT_BRACKET = 72; // 0x48
    field public static final int KEYCODE_RO = 217; // 0xd9
    field public static final int KEYCODE_S = 47; // 0x2f
    field public static final int KEYCODE_SCREENSHOT = 226; // 0xe2
    field public static final int KEYCODE_SCROLL_LOCK = 116; // 0x74
    field public static final int KEYCODE_SEARCH = 84; // 0x54
    field public static final int KEYCODE_SEMICOLON = 74; // 0x4a
@@ -23427,6 +23431,9 @@ package android.view {
    field public static final int KEYCODE_SYSRQ = 120; // 0x78
    field public static final int KEYCODE_T = 48; // 0x30
    field public static final int KEYCODE_TAB = 61; // 0x3d
    field public static final int KEYCODE_TOGGLE_BT = 221; // 0xdd
    field public static final int KEYCODE_TOGGLE_TOUCHPAD = 222; // 0xde
    field public static final int KEYCODE_TOGGLE_WIFI = 220; // 0xdc
    field public static final int KEYCODE_TV = 170; // 0xaa
    field public static final int KEYCODE_TV_INPUT = 178; // 0xb2
    field public static final int KEYCODE_TV_POWER = 177; // 0xb1
+16 −1
Original line number Diff line number Diff line
@@ -624,7 +624,15 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * Launches the global assist activity.  Not delivered to applications. */
    public static final int KEYCODE_ASSIST          = 219;

    private static final int LAST_KEYCODE           = KEYCODE_ASSIST;
    public static final int KEYCODE_TOGGLE_WIFI     = 220;
    public static final int KEYCODE_TOGGLE_BT       = 221;
    public static final int KEYCODE_TOGGLE_TOUCHPAD = 222;
    public static final int KEYCODE_BRIGHTNESS_DOWN = 223;
    public static final int KEYCODE_BRIGHTNESS_UP   = 224;
    public static final int KEYCODE_BRIGHTNESS_AUTO = 225;
    public static final int KEYCODE_SCREENSHOT      = 226;

    private static final int LAST_KEYCODE           = KEYCODE_SCREENSHOT;

    // NOTE: If you add a new keycode here you must also add it to:
    //  isSystem()
@@ -866,6 +874,13 @@ public class KeyEvent extends InputEvent implements Parcelable {
        names.append(KEYCODE_RO, "KEYCODE_RO");
        names.append(KEYCODE_KANA, "KEYCODE_KANA");
        names.append(KEYCODE_ASSIST, "KEYCODE_ASSIST");
        names.append(KEYCODE_TOGGLE_WIFI, "KEYCODE_TOGGLE_WIFI");
        names.append(KEYCODE_TOGGLE_BT, "KEYCODE_TOGGLE_BT");
        names.append(KEYCODE_TOGGLE_TOUCHPAD, "KEYCODE_TOGGLE_TOUCHPAD");
        names.append(KEYCODE_BRIGHTNESS_DOWN, "KEYCODE_BRIGHTNESS_DOWN");
        names.append(KEYCODE_BRIGHTNESS_UP, "KEYCODE_BRIGHTNESS_UP");
        names.append(KEYCODE_BRIGHTNESS_AUTO, "KEYCODE_BRIGHTNESS_AUTO");
        names.append(KEYCODE_SCREENSHOT, "KEYCODE_SCREENSHOT");
    };

    // Symbolic names of all metakeys in bit order from least significant to most significant.
+7 −0
Original line number Diff line number Diff line
@@ -1530,6 +1530,13 @@
        <enum name="KEYCODE_YEN" value="216" />
        <enum name="KEYCODE_RO" value="217" />
        <enum name="KEYCODE_KANA" value="218" />
        <enum name="KEYCODE_TOGGLE_WIFI" value="220" />
        <enum name="KEYCODE_TOGGLE_BT" value="221" />
        <enum name="KEYCODE_TOGGLE_TOUCHPAD" value="222" />
        <enum name="KEYCODE_BRIGHTNESS_DOWN" value="223" />
        <enum name="KEYCODE_BRIGHTNESS_UP" value="224" />
        <enum name="KEYCODE_BRIGHTNESS_AUTO" value="225" />
        <enum name="KEYCODE_SCREENSHOT" value="226" />
    </attr>

    <!-- ***************************************************************** -->
+7 −0
Original line number Diff line number Diff line
@@ -244,6 +244,13 @@ static const KeycodeLabel KEYCODES[] = {
    { "RO", 217 },
    { "KANA", 218 },
    { "ASSIST", 219 },
    { "TOGGLE_WIFI", 220 },
    { "TOGGLE_BT", 221 },
    { "TOGGLE_TOUCHPAD", 222 },
    { "BRIGHTNESS_DOWN", 223 },
    { "BRIGHTNESS_UP", 224 },
    { "BRIGHTNESS_AUTO", 225 },
    { "SCREENSHOT", 226 },

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