Add new keycodes for the convenience of Japanese IMEs
Change-Id: Ibd308cef11261147856258595f6ca0137e03e05c
diff --git a/api/current.xml b/api/current.xml
index 3b65d95..d8702de 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -153254,6 +153254,17 @@
visibility="public"
>
</field>
+<field name="KEYCODE_PICTSYMBOLS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="94"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="KEYCODE_PLUS"
type="int"
transient="false"
@@ -153430,6 +153441,17 @@
visibility="public"
>
</field>
+<field name="KEYCODE_SWITCH_CHARSET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="95"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="KEYCODE_SYM"
type="int"
transient="false"
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
old mode 100644
new mode 100755
index 14e0159..9aa16b5
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -122,6 +122,8 @@
public static final int KEYCODE_MUTE = 91;
public static final int KEYCODE_PAGE_UP = 92;
public static final int KEYCODE_PAGE_DOWN = 93;
+ public static final int KEYCODE_PICTSYMBOLS = 94; // switch symbol-sets (Emoji,Kao-moji)
+ public static final int KEYCODE_SWITCH_CHARSET = 95; // switch char-sets (Kanji,Katakana)
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
@@ -137,7 +139,7 @@
// those new codes. This is intended to maintain a consistent
// set of key code definitions across all Android devices.
- private static final int LAST_KEYCODE = KEYCODE_PAGE_DOWN;
+ private static final int LAST_KEYCODE = KEYCODE_SWITCH_CHARSET;
/**
* @deprecated There are now more than MAX_KEYCODE keycodes.
@@ -694,6 +696,8 @@
case KEYCODE_CAMERA:
case KEYCODE_FOCUS:
case KEYCODE_SEARCH:
+ case KEYCODE_PICTSYMBOLS:
+ case KEYCODE_SWITCH_CHARSET:
return true;
default:
return false;
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
old mode 100644
new mode 100755
index 91256f1..a660fd9
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -914,6 +914,8 @@
<enum name="KEYCODE_MUTE" value="91" />
<enum name="KEYCODE_PAGE_UP" value="92" />
<enum name="KEYCODE_PAGE_DOWN" value="93" />
+ <enum name="KEYCODE_PICTSYMBOLS" value="94" />
+ <enum name="KEYCODE_SWITCH_CHARSET" value="95" />
</attr>
<!-- ***************************************************************** -->
diff --git a/include/ui/KeycodeLabels.h b/include/ui/KeycodeLabels.h
old mode 100644
new mode 100755
index 749155e..e81d0f9
--- a/include/ui/KeycodeLabels.h
+++ b/include/ui/KeycodeLabels.h
@@ -116,6 +116,8 @@
{ "MUTE", 91 },
{ "PAGE_UP", 92 },
{ "PAGE_DOWN", 93 },
+ { "PICTSYMBOLS", 94 },
+ { "SWITCH_CHARSET", 95 },
// NOTE: If you add a new keycode here you must also add it to:
// (enum KeyCode, in this file)
@@ -222,7 +224,9 @@
kKeyCodeForward = 90,
kKeyCodeMute = 91,
kKeyCodePageUp = 92,
- kKeyCodePageDown = 93
+ kKeyCodePageDown = 93,
+ kKeyCodePictSymbols = 94,
+ kKeyCodeSwitchCharset = 95
} KeyCode;
static const KeycodeLabel FLAGS[] = {