diff --git a/java/res/values/keycodes.xml b/java/res/values/keycodes.xml
index d6f9bfc28..0f0a74aea 100644
--- a/java/res/values/keycodes.xml
+++ b/java/res/values/keycodes.xml
@@ -26,8 +26,8 @@
-1
-2
-5
- -100
- -102
+ -6
+ -8
@@ -45,7 +45,7 @@
- @string/description_delete_key
- @integer/key_settings
- @string/description_settings_key
- - @integer/key_voice
+ - @integer/key_shortcut
- @string/description_voice_key
diff --git a/java/res/xml-xlarge/kbd_key_styles.xml b/java/res/xml-xlarge/kbd_key_styles.xml
index 4fefe0056..57eaccbae 100644
--- a/java/res/xml-xlarge/kbd_key_styles.xml
+++ b/java/res/xml-xlarge/kbd_key_styles.xml
@@ -73,7 +73,7 @@
latin:parentStyle="functionalKeyStyle" />
@@ -127,7 +127,7 @@
latin:parentStyle="functionalKeyStyle" />
diff --git a/java/res/xml/kbd_key_styles.xml b/java/res/xml/kbd_key_styles.xml
index bfc7c4ff2..4792e1f00 100644
--- a/java/res/xml/kbd_key_styles.xml
+++ b/java/res/xml/kbd_key_styles.xml
@@ -118,7 +118,7 @@
latin:parentStyle="functionalKeyStyle" />
@@ -191,7 +191,7 @@
latin:parentStyle="functionalKeyStyle" />
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index fdfe282c3..c02c22494 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -68,19 +68,14 @@ public class Keyboard {
public static final int CODE_DUMMY = 0;
public static final int CODE_SHIFT = -1;
public static final int CODE_SWITCH_ALPHA_SYMBOL = -2;
- public static final int CODE_CANCEL = -3;
- public static final int CODE_DONE = -4;
+ public static final int CODE_CAPSLOCK = -3;
+ public static final int CODE_CANCEL = -4;
public static final int CODE_DELETE = -5;
- public static final int CODE_ALT = -6;
+ public static final int CODE_SETTINGS = -6;
+ public static final int CODE_SETTINGS_LONGPRESS = -7;
+ public static final int CODE_SHORTCUT = -8;
// Code value representing the code is not specified.
public static final int CODE_UNSPECIFIED = -99;
- public static final int CODE_SETTINGS = -100;
- public static final int CODE_SETTINGS_LONGPRESS = -101;
- // TODO: remove this once LatinIME stops referring to this.
- public static final int CODE_VOICE = -102;
- public static final int CODE_CAPSLOCK = -103;
- public static final int CODE_NEXT_LANGUAGE = -104;
- public static final int CODE_PREV_LANGUAGE = -105;
/** Horizontal gap default for all rows */
private int mDefaultHorizontalGap;
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
index 3a5dbd2de..b8bcee687 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java
@@ -46,6 +46,9 @@ import java.util.Locale;
public class LatinKeyboard extends Keyboard {
private static final int SPACE_LED_LENGTH_PERCENT = 80;
+ public static final int CODE_NEXT_LANGUAGE = -100;
+ public static final int CODE_PREV_LANGUAGE = -101;
+
private final Context mContext;
private final SubtypeSwitcher mSubtypeSwitcher = SubtypeSwitcher.getInstance();
@@ -102,7 +105,7 @@ public class LatinKeyboard extends Keyboard {
case CODE_SPACE:
spaceKeyIndex = index;
break;
- case CODE_VOICE:
+ case CODE_SHORTCUT:
shortcutKeyIndex = index;
break;
}
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 912074515..a64a9e609 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -236,7 +236,7 @@ public class LatinKeyboardView extends KeyboardView {
if (languageDirection != 0) {
getOnKeyboardActionListener().onCodeInput(
languageDirection == 1
- ? Keyboard.CODE_NEXT_LANGUAGE : Keyboard.CODE_PREV_LANGUAGE,
+ ? LatinKeyboard.CODE_NEXT_LANGUAGE : LatinKeyboard.CODE_PREV_LANGUAGE,
null, mLastX, mLastY);
me.setAction(MotionEvent.ACTION_CANCEL);
keyboard.keyReleased();
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index a680b9825..0ae675b3b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1159,16 +1159,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
case Keyboard.CODE_SETTINGS_LONGPRESS:
onSettingsKeyLongPressed();
break;
- case Keyboard.CODE_NEXT_LANGUAGE:
+ case LatinKeyboard.CODE_NEXT_LANGUAGE:
toggleLanguage(true);
break;
- case Keyboard.CODE_PREV_LANGUAGE:
+ case LatinKeyboard.CODE_PREV_LANGUAGE:
toggleLanguage(false);
break;
case Keyboard.CODE_CAPSLOCK:
switcher.toggleCapsLock();
break;
- case Keyboard.CODE_VOICE:
+ case Keyboard.CODE_SHORTCUT:
mSubtypeSwitcher.switchToShortcutIME();
break;
case Keyboard.CODE_TAB: