diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index 4b9ff28..36a988b 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -777,7 +777,7 @@
 
                 params.mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0);
                 params.mIconsSet.loadIcons(keyboardAttr);
-                params.mCodesSet.setLocale(params.mId.mLocale);
+                params.mCodesSet.setLanguage(params.mId.mLocale.getLanguage());
 
                 final int resourceId = keyboardAttr.getResourceId(
                         R.styleable.Keyboard_touchPositionCorrectionData, 0);
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
index 964c8ca..736a96c 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java
@@ -19,17 +19,16 @@
 import com.android.inputmethod.keyboard.Keyboard;
 
 import java.util.HashMap;
-import java.util.Locale;
 
 public class KeyboardCodesSet {
-    private static final HashMap<Locale, int[]> sLocaleToCodesMap =
-            new HashMap<Locale, int[]>();
+    private static final HashMap<String, int[]> sLanguageToCodesMap =
+            new HashMap<String, int[]>();
     private static final HashMap<String, Integer> sNameToIdMap = new HashMap<String, Integer>();
 
     private int[] mCodes = DEFAULT;
 
-    public void setLocale(final Locale locale) {
-        final int[] codes = sLocaleToCodesMap.get(locale);
+    public void setLanguage(final String language) {
+        final int[] codes = sLanguageToCodesMap.get(language);
         mCodes = (codes != null) ? codes : DEFAULT;
     }
 
@@ -85,6 +84,7 @@
         Keyboard.CODE_SHORTCUT,
         Keyboard.CODE_ACTION_ENTER,
         Keyboard.CODE_ACTION_NEXT,
+        Keyboard.CODE_ACTION_PREVIOUS,
         Keyboard.CODE_LANGUAGE_SWITCH,
         Keyboard.CODE_UNSPECIFIED,
         CODE_LEFT_PARENTHESIS,
@@ -111,6 +111,7 @@
         DEFAULT[10],
         DEFAULT[11],
         DEFAULT[12],
+        DEFAULT[13],
         CODE_RIGHT_PARENTHESIS,
         CODE_LEFT_PARENTHESIS,
         CODE_GREATER_THAN_SIGN,
@@ -121,12 +122,12 @@
         CODE_LEFT_CURLY_BRACKET,
     };
 
-    private static final String LANGUAGE_DEFAULT = null;
+    private static final String LANGUAGE_DEFAULT = "DEFAULT";
     private static final String LANGUAGE_ARABIC = "ar";
     private static final String LANGUAGE_PERSIAN = "fa";
     private static final String LANGUAGE_HEBREW = "iw";
 
-    private static final Object[] LOCALE_AND_CODES = {
+    private static final Object[] LANGUAGE_AND_CODES = {
         LANGUAGE_DEFAULT, DEFAULT,
         LANGUAGE_ARABIC, RTL,
         LANGUAGE_PERSIAN, RTL,
@@ -138,12 +139,10 @@
             sNameToIdMap.put(ID_TO_NAME[i], i);
         }
 
-        for (int i = 0; i < LOCALE_AND_CODES.length; i += 2) {
-            final String localeString = (String)LOCALE_AND_CODES[i];
-            final int[] codes = (int[])LOCALE_AND_CODES[i + 1];
-            final Locale locale = (localeString == LANGUAGE_DEFAULT)
-                    ? null : new Locale(localeString);
-            sLocaleToCodesMap.put(locale, codes);
+        for (int i = 0; i < LANGUAGE_AND_CODES.length; i += 2) {
+            final String language = (String)LANGUAGE_AND_CODES[i];
+            final int[] codes = (int[])LANGUAGE_AND_CODES[i + 1];
+            sLanguageToCodesMap.put(language, codes);
         }
     }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java
index 58b43d4..980b1e4 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java
@@ -41,8 +41,10 @@
     private int mSettingsIconId;
 
     @Override
-    protected void setUp() {
-        mCodesSet.setLocale(Locale.US);
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        mCodesSet.setLanguage(Locale.ENGLISH.getLanguage());
         mCodeSettings = mCodesSet.getCode(CODE_SETTINGS_NAME);
         mSettingsIconId = KeyboardIconsSet.getIconId(ICON_SETTINGS_NAME);
     }
