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

Commit 96658f71 authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

New keycode definitions for HDMI-CEC

Following keys are added to be mapped to HDMI-CEC standard keys:

KEYCODE_MEDIA_TOP_MENU
KEYCODE_11
KEYCODE_12
KEYCODE_LAST_CHANNEL
KEYCODE_TV_DATA_SERVICE

Also updated the information on the key code update by removing
some files not present any more.

Change-Id: I305d9b578c1824f34c457144a68132717dc9a97f
parent d6a91b0b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -30664,6 +30664,7 @@ package android.view {
    field public static final int SOURCE_CLASS_TRACKBALL = 4; // 0x4
    field public static final int SOURCE_DPAD = 513; // 0x201
    field public static final int SOURCE_GAMEPAD = 1025; // 0x401
    field public static final int SOURCE_HDMI = 33554433; // 0x2000001
    field public static final int SOURCE_JOYSTICK = 16777232; // 0x1000010
    field public static final int SOURCE_KEYBOARD = 257; // 0x101
    field public static final int SOURCE_MOUSE = 8194; // 0x2002
@@ -30832,6 +30833,8 @@ package android.view {
    field public static final deprecated int FLAG_WOKE_HERE = 1; // 0x1
    field public static final int KEYCODE_0 = 7; // 0x7
    field public static final int KEYCODE_1 = 8; // 0x8
    field public static final int KEYCODE_11 = 227; // 0xe3
    field public static final int KEYCODE_12 = 228; // 0xe4
    field public static final int KEYCODE_2 = 9; // 0x9
    field public static final int KEYCODE_3 = 10; // 0xa
    field public static final int KEYCODE_3D_MODE = 206; // 0xce
@@ -30951,6 +30954,7 @@ package android.view {
    field public static final int KEYCODE_KATAKANA_HIRAGANA = 215; // 0xd7
    field public static final int KEYCODE_L = 40; // 0x28
    field public static final int KEYCODE_LANGUAGE_SWITCH = 204; // 0xcc
    field public static final int KEYCODE_LAST_CHANNEL = 229; // 0xe5
    field public static final int KEYCODE_LEFT_BRACKET = 71; // 0x47
    field public static final int KEYCODE_M = 41; // 0x29
    field public static final int KEYCODE_MANNER_MODE = 205; // 0xcd
@@ -30966,6 +30970,7 @@ package android.view {
    field public static final int KEYCODE_MEDIA_RECORD = 130; // 0x82
    field public static final int KEYCODE_MEDIA_REWIND = 89; // 0x59
    field public static final int KEYCODE_MEDIA_STOP = 86; // 0x56
    field public static final int KEYCODE_MEDIA_TOP_MENU = 226; // 0xe2
    field public static final int KEYCODE_MENU = 82; // 0x52
    field public static final int KEYCODE_META_LEFT = 117; // 0x75
    field public static final int KEYCODE_META_RIGHT = 118; // 0x76
@@ -31038,6 +31043,7 @@ package android.view {
    field public static final int KEYCODE_T = 48; // 0x30
    field public static final int KEYCODE_TAB = 61; // 0x3d
    field public static final int KEYCODE_TV = 170; // 0xaa
    field public static final int KEYCODE_TV_DATA_SERVICE = 230; // 0xe6
    field public static final int KEYCODE_TV_INPUT = 178; // 0xb2
    field public static final int KEYCODE_TV_POWER = 177; // 0xb1
    field public static final int KEYCODE_U = 49; // 0x31
+8 −0
Original line number Diff line number Diff line
@@ -233,6 +233,14 @@ public final class InputDevice implements Parcelable {
     */
    public static final int SOURCE_JOYSTICK = 0x01000000 | SOURCE_CLASS_JOYSTICK;

    /**
     * The input source is a device connected through HDMI-based bus.
     *
     * The key comes in through HDMI-CEC or MHL signal line, and is treated as if it were
     * generated by a locally connected DPAD or keyboard.
     */
    public static final int SOURCE_HDMI = 0x02000000 | SOURCE_CLASS_BUTTON;

    /**
     * A special input source constant that is used when filtering input devices
     * to match devices that provide any type of input source.
+16 −4
Original line number Diff line number Diff line
@@ -644,14 +644,26 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * devices or game controllers, especially if no other input mode is
     * available. */
    public static final int KEYCODE_PAIRING         = 225;

    private static final int LAST_KEYCODE = KEYCODE_PAIRING;
    /** Key code constant: Media Top Menu key.
     * Goes to the top of media menu. */
    public static final int KEYCODE_MEDIA_TOP_MENU  = 226;
    /** Key code constant: '11' key. */
    public static final int KEYCODE_11              = 227;
    /** Key code constant: '12' key. */
    public static final int KEYCODE_12              = 228;
    /** Key code constant: Last Channel key.
     * Goes to the last viewed channel. */
    public static final int KEYCODE_LAST_CHANNEL    = 229;
    /** Key code constant: TV data service key.
     * Displays data services like weather, sports. */
    public static final int KEYCODE_TV_DATA_SERVICE = 230;

    private static final int LAST_KEYCODE = KEYCODE_TV_DATA_SERVICE;

    // NOTE: If you add a new keycode here you must also add it to:
    //  isSystem()
    //  frameworks/native/include/android/keycodes.h
    //  frameworks/base/include/androidfw/InputEventAttributes.h
    //  external/webkit/WebKit/android/plugins/ANPKeyCodes.h
    //  frameworks/native/include/input/InputEventLabels.h
    //  frameworks/base/core/res/res/values/attrs.xml
    //  emulator?
    //  LAST_KEYCODE
+5 −0
Original line number Diff line number Diff line
@@ -1669,6 +1669,11 @@
        <enum name="KEYCODE_MEDIA_SLEEP" value="223" />
        <enum name="KEYCODE_MEDIA_WAKEUP" value="224" />
        <enum name="KEYCODE_PAIRING" value="225" />
        <enum name="KEYCODE_MEDIA_TOP_MENU" value="226" />
        <enum name="KEYCODE_11" value="227" />
        <enum name="KEYCODE_12" value="228" />
        <enum name="KEYCODE_LAST_CHANNEL" value="229" />
        <enum name="KEYCODE_TV_DATA_SERVICE" value="230" />
    </attr>

    <!-- ***************************************************************** -->