Permalink
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: I94a5a4e80e5de85db49a1044c7dcb9ef28db075c
  • Loading branch information...
1 parent 75b2e6d commit 70c7bd81dd33beb5c0e9aa0ae61d19ed319228c4 @aleho aleho committed Apr 10, 2012
View
@@ -22208,6 +22208,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 = 216; // 0xd8
+ field public static final int KEYCODE_BRIGHTNESS_DOWN = 214; // 0xd6
+ field public static final int KEYCODE_BRIGHTNESS_UP = 215; // 0xd7
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
@@ -22361,6 +22364,7 @@ package android.view {
field public static final int KEYCODE_R = 46; // 0x2e
field public static final int KEYCODE_RIGHT_BRACKET = 72; // 0x48
field public static final int KEYCODE_S = 47; // 0x2f
+ field public static final int KEYCODE_SCREENSHOT = 217; // 0xd9
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
@@ -22379,6 +22383,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 = 212; // 0xd4
+ field public static final int KEYCODE_TOGGLE_TOUCHPAD = 213; // 0xd5
+ field public static final int KEYCODE_TOGGLE_WIFI = 211; // 0xd3
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
@@ -592,7 +592,15 @@
* Used to launch a calculator application. */
public static final int KEYCODE_CALCULATOR = 210;
- private static final int LAST_KEYCODE = KEYCODE_CALCULATOR;
+ public static final int KEYCODE_TOGGLE_WIFI = 211;
+ public static final int KEYCODE_TOGGLE_BT = 212;
+ public static final int KEYCODE_TOGGLE_TOUCHPAD = 213;
+ public static final int KEYCODE_BRIGHTNESS_DOWN = 214;
+ public static final int KEYCODE_BRIGHTNESS_UP = 215;
+ public static final int KEYCODE_BRIGHTNESS_AUTO = 216;
+ public static final int KEYCODE_SCREENSHOT = 217;
+
+ private static final int LAST_KEYCODE = KEYCODE_SCREENSHOT;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
@@ -825,6 +833,13 @@ private static void populateKeycodeSymbolicNames() {
names.append(KEYCODE_CALENDAR, "KEYCODE_CALENDAR");
names.append(KEYCODE_MUSIC, "KEYCODE_MUSIC");
names.append(KEYCODE_CALCULATOR, "KEYCODE_CALCULATOR");
+ 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.
@@ -1497,6 +1497,13 @@
<enum name="KEYCODE_CALENDAR" value="208" />
<enum name="KEYCODE_MUSIC" value="209" />
<enum name="KEYCODE_CALCULATOR" value="210" />
+ <enum name="KEYCODE_TOGGLE_WIFI" value="211" />
+ <enum name="KEYCODE_TOGGLE_BT" value="212" />
+ <enum name="KEYCODE_TOGGLE_TOUCHPAD" value="213" />
+ <enum name="KEYCODE_BRIGHTNESS_DOWN" value="214" />
+ <enum name="KEYCODE_BRIGHTNESS_UP" value="215" />
+ <enum name="KEYCODE_BRIGHTNESS_AUTO" value="216" />
+ <enum name="KEYCODE_SCREENSHOT" value="217" />
</attr>
<!-- ***************************************************************** -->
@@ -235,6 +235,13 @@ static const KeycodeLabel KEYCODES[] = {
{ "CALENDAR", 208 },
{ "MUSIC", 209 },
{ "CALCULATOR", 210 },
+ { "TOGGLE_WIFI", 211 },
+ { "TOGGLE_BT", 212 },
+ { "TOGGLE_TOUCHPAD", 213 },
+ { "BRIGHTNESS_DOWN", 214 },
+ { "BRIGHTNESS_UP", 215 },
+ { "BRIGHTNESS_AUTO", 216 },
+ { "SCREENSHOT", 217 },
// 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.
@@ -254,6 +254,13 @@ enum {
AKEYCODE_CALENDAR = 208,
AKEYCODE_MUSIC = 209,
AKEYCODE_CALCULATOR = 210,
+ AKEYCODE_TOGGLE_WIFI = 211,
+ AKEYCODE_TOGGLE_BT = 212,
+ AKEYCODE_TOGGLE_TOUCHPAD = 213,
+ AKEYCODE_BRIGHTNESS_DOWN = 214,
+ AKEYCODE_BRIGHTNESS_UP = 215,
+ AKEYCODE_BRIGHTNESS_AUTO = 216,
+ AKEYCODE_SCREENSHOT = 217,
// 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.

0 comments on commit 70c7bd8

Please sign in to comment.