diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 8ee859b..f2072fd 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -518,6 +518,8 @@
         <attr name="enableProximityCharsCorrection" format="boolean" />
         <!-- Indicates if the keyboard layout supports being split or not. false by default -->
         <attr name="supportsSplitLayout" format="boolean" />
+        <!-- Allow redundant more keys when they are in the base layout. true by default. -->
+        <attr name="allowRedundantMoreKeys" format="boolean" />
     </declare-styleable>
 
     <declare-styleable name="KeyboardLayoutSet_Feature">
diff --git a/java/res/xml/keyboard_layout_set_nordic.xml b/java/res/xml/keyboard_layout_set_nordic.xml
index 1f00f44..d07f78a 100644
--- a/java/res/xml/keyboard_layout_set_nordic.xml
+++ b/java/res/xml/keyboard_layout_set_nordic.xml
@@ -23,7 +23,8 @@
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
+        latin:enableProximityCharsCorrection="true"
+        latin:allowRedundantMoreKeys="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/res/xml/keyboard_layout_set_swiss.xml b/java/res/xml/keyboard_layout_set_swiss.xml
index e17a5ab..f925b83 100644
--- a/java/res/xml/keyboard_layout_set_swiss.xml
+++ b/java/res/xml/keyboard_layout_set_swiss.xml
@@ -23,7 +23,8 @@
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_swiss"
-        latin:enableProximityCharsCorrection="true" />
+        latin:enableProximityCharsCorrection="true"
+        latin:allowRedundantMoreKeys="true" />
     <Element
         latin:elementName="symbols"
         latin:elementKeyboard="@xml/kbd_symbols" />
diff --git a/java/src/com/android/inputmethod/compat/CharacterCompat.java b/java/src/com/android/inputmethod/compat/CharacterCompat.java
new file mode 100644
index 0000000..609fe16
--- /dev/null
+++ b/java/src/com/android/inputmethod/compat/CharacterCompat.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.compat;
+
+import java.lang.reflect.Method;
+
+public final class CharacterCompat {
+    // Note that Character.isAlphabetic(int), has been introduced in API level 19
+    // (Build.VERSION_CODE.KITKAT).
+    private static final Method METHOD_isAlphabetic = CompatUtils.getMethod(
+            Character.class, "isAlphabetic", int.class);
+
+    private CharacterCompat() {
+        // This utility class is not publicly instantiable.
+    }
+
+    public static boolean isAlphabetic(final int code) {
+        if (METHOD_isAlphabetic != null) {
+            return (Boolean)CompatUtils.invoke(null, false, METHOD_isAlphabetic, code);
+        }
+        switch (Character.getType(code)) {
+        case Character.UPPERCASE_LETTER:
+        case Character.LOWERCASE_LETTER:
+        case Character.TITLECASE_LETTER:
+        case Character.MODIFIER_LETTER:
+        case Character.OTHER_LETTER:
+        case Character.LETTER_NUMBER:
+            return true;
+        default:
+            return false;
+        }
+    }
+}
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 863a8b7..bf29b5f 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -395,6 +395,10 @@
      * @param key the original key.
      */
     protected Key(final Key key) {
+        this(key, key.mMoreKeys);
+    }
+
+    private Key(final Key key, final MoreKeySpec[] moreKeys) {
         // Final attributes.
         mCode = key.mCode;
         mLabel = key.mLabel;
@@ -408,7 +412,7 @@
         mX = key.mX;
         mY = key.mY;
         mHitBox.set(key.mHitBox);
-        mMoreKeys = key.mMoreKeys;
+        mMoreKeys = moreKeys;
         mMoreKeysColumnAndFlags = key.mMoreKeysColumnAndFlags;
         mBackgroundType = key.mBackgroundType;
         mActionFlags = key.mActionFlags;
@@ -420,6 +424,14 @@
         mEnabled = key.mEnabled;
     }
 
+    public static Key removeRedundantMoreKeys(final Key key,
+            final MoreKeySpec.LettersOnBaseLayout lettersOnBaseLayout) {
+        final MoreKeySpec[] moreKeys = key.getMoreKeys();
+        final MoreKeySpec[] filteredMoreKeys = MoreKeySpec.removeRedundantMoreKeys(
+                moreKeys, lettersOnBaseLayout);
+        return (filteredMoreKeys == moreKeys) ? key : new Key(key, filteredMoreKeys);
+    }
+
     private static boolean needsToUpperCase(final int labelFlags, final int keyboardElementId) {
         if ((labelFlags & LABEL_FLAGS_PRESERVE_CASE) != 0) return false;
         switch (keyboardElementId) {
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
index 47fb7b3..52b9284 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
@@ -97,6 +97,7 @@
         int mKeyboardXmlId;
         boolean mProximityCharsCorrectionEnabled;
         boolean mSupportsSplitLayout;
+        boolean mAllowRedundantMoreKeys;
         public ElementParams() {}
     }
 
@@ -202,6 +203,7 @@
         if (id.isAlphabetKeyboard()) {
             builder.setAutoGenerate(sKeysCache);
         }
+        builder.setAllowRedundantMoreKes(elementParams.mAllowRedundantMoreKeys);
         final int keyboardXmlId = elementParams.mKeyboardXmlId;
         builder.load(keyboardXmlId, id);
         if (mParams.mDisableTouchPositionCorrectionDataForTest) {
@@ -395,6 +397,8 @@
                         false);
                 elementParams.mSupportsSplitLayout = a.getBoolean(
                         R.styleable.KeyboardLayoutSet_Element_supportsSplitLayout, false);
+                elementParams.mAllowRedundantMoreKeys = a.getBoolean(
+                        R.styleable.KeyboardLayoutSet_Element_allowRedundantMoreKeys, true);
                 mParams.mKeyboardLayoutSetElementIdToParamsMap.put(elementName, elementParams);
             } finally {
                 a.recycle();
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
index 2056a0b..5038555 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
@@ -162,6 +162,10 @@
         mParams.mKeysCache = keysCache;
     }
 
+    public void setAllowRedundantMoreKes(final boolean enabled) {
+        mParams.mAllowRedundantMoreKeys = enabled;
+    }
+
     public KeyboardBuilder<KP> load(final int xmlId, final KeyboardId id) {
         mParams.mId = id;
         final XmlResourceParser parser = mResources.getXml(xmlId);
@@ -851,6 +855,7 @@
     }
 
     private void endKeyboard() {
+        mParams.removeRedundantMoreKeys();
         // {@link #parseGridRows(XmlPullParser,boolean)} may populate keyboard rows higher than
         // previously expected.
         final int actualHeight = mCurrentY - mParams.mVerticalGap + mParams.mBottomPadding;
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java
index 5df9d3e..1e1188b 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParams.java
@@ -68,6 +68,7 @@
     public final KeyStylesSet mKeyStyles = new KeyStylesSet(mTextsSet);
 
     public KeysCache mKeysCache;
+    public boolean mAllowRedundantMoreKeys;
 
     public int mMostCommonKeyHeight = 0;
     public int mMostCommonKeyWidth = 0;
@@ -115,6 +116,23 @@
         }
     }
 
+    public void removeRedundantMoreKeys() {
+        if (mAllowRedundantMoreKeys) {
+            return;
+        }
+        final MoreKeySpec.LettersOnBaseLayout lettersOnBaseLayout =
+                new MoreKeySpec.LettersOnBaseLayout();
+        for (final Key key : mSortedKeys) {
+            lettersOnBaseLayout.addLetter(key);
+        }
+        final ArrayList<Key> allKeys = new ArrayList<>(mSortedKeys);
+        mSortedKeys.clear();
+        for (final Key key : allKeys) {
+            final Key filteredKey = Key.removeRedundantMoreKeys(key, lettersOnBaseLayout);
+            mSortedKeys.add(mKeysCache.replace(key, filteredKey));
+        }
+    }
+
     private int mMaxHeightCount = 0;
     private int mMaxWidthCount = 0;
     private final SparseIntArray mHeightHistogram = new SparseIntArray();
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeysCache.java b/java/src/com/android/inputmethod/keyboard/internal/KeysCache.java
index 7743d47..e867863 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeysCache.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeysCache.java
@@ -36,4 +36,12 @@
         mMap.put(key, key);
         return key;
     }
+
+    public Key replace(final Key oldKey, final Key newKey) {
+        if (oldKey.equals(newKey)) {
+            return oldKey;
+        }
+        mMap.remove(oldKey);
+        return get(newKey);
+    }
 }
diff --git a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java
index 625a0c2..764159c 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java
@@ -17,7 +17,9 @@
 package com.android.inputmethod.keyboard.internal;
 
 import android.text.TextUtils;
+import android.util.SparseIntArray;
 
+import com.android.inputmethod.compat.CharacterCompat;
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.define.DebugFlags;
@@ -26,6 +28,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Locale;
 
 /**
@@ -110,6 +113,46 @@
         }
     }
 
+    public static class LettersOnBaseLayout {
+        private final SparseIntArray mCodes = new SparseIntArray();
+        private final HashSet<String> mTexts = new HashSet<>();
+
+        public void addLetter(final Key key) {
+            final int code = key.getCode();
+            if (CharacterCompat.isAlphabetic(code)) {
+                mCodes.put(code, 0);
+            } else if (code == Constants.CODE_OUTPUT_TEXT) {
+                mTexts.add(key.getOutputText());
+            }
+        }
+
+        public boolean contains(final MoreKeySpec moreKey) {
+            final int code = moreKey.mCode;
+            if (CharacterCompat.isAlphabetic(code) && mCodes.indexOfKey(code) >= 0) {
+                return true;
+            } else if (code == Constants.CODE_OUTPUT_TEXT && mTexts.contains(moreKey.mOutputText)) {
+                return true;
+            }
+            return false;
+        }
+    }
+
+    public static MoreKeySpec[] removeRedundantMoreKeys(final MoreKeySpec[] moreKeys,
+            final LettersOnBaseLayout lettersOnBaseLayout) {
+        if (moreKeys == null) {
+            return null;
+        }
+        final ArrayList<MoreKeySpec> filteredMoreKeys = new ArrayList<>();
+        for (final MoreKeySpec moreKey : moreKeys) {
+            if (!lettersOnBaseLayout.contains(moreKey)) {
+                filteredMoreKeys.add(moreKey);
+            }
+        }
+        final int size = filteredMoreKeys.size();
+        return (moreKeys.length == size) ? moreKeys
+                : filteredMoreKeys.toArray(new MoreKeySpec[size]);
+    }
+
     private static final boolean DEBUG = DebugFlags.DEBUG_ENABLED;
     // Constants for parsing.
     private static final char COMMA = Constants.CODE_COMMA;
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
index ba94c8d..66fce01 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java
@@ -18,9 +18,8 @@
 
 import com.android.inputmethod.keyboard.KeyboardId;
 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey;
-import com.android.inputmethod.latin.settings.CustomInputStyleSettingsFragment;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 
 import java.util.Locale;
 
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java
new file mode 100644
index 0000000..b7c181b
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/DanishCustomizer.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+class DanishCustomizer extends EuroCustomizer {
+    public DanishCustomizer(final Locale locale) { super(locale); }
+
+    @Override
+    public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
+
+    @Override
+    public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
+
+    @Override
+    public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
+
+    @Override
+    public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
+
+    protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+        builder
+                // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+                .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
+                // U+00E6: "æ" LATIN SMALL LETTER AE
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                .replaceKeyOfLabel(Nordic.ROW2_10, "\u00E6")
+                .setMoreKeysOf("\u00E6", "\u00E4")
+                // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+                // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+                .replaceKeyOfLabel(Nordic.ROW2_11, "\u00F8")
+                .setMoreKeysOf("\u00F8", "\u00F6");
+    }
+
+    @Override
+    public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+        setNordicKeys(builder);
+        return builder
+                // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+                // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+                .setMoreKeysOf("e", "\u00E9", "\u00EB")
+                // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
+                // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
+                .setMoreKeysOf("y", "\u00FD", "\u00FF")
+                // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+                // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+                // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+                // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+                // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
+                .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
+                // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+                // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+                .setMoreKeysOf("i", "\u00ED", "\u00EF")
+                // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+                // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+                // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+                // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+                // U+0153: "œ" LATIN SMALL LIGATURE OE
+                // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+                .setMoreKeysOf("o", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D")
+                // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+                // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+                // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+                // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
+                .setMoreKeysOf("a", "\u00E1", "\u00E4", "\u00E0", "\u00E2", "\u00E3", "\u0101")
+                // U+00DF: "ß" LATIN SMALL LETTER SHARP S
+                // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
+                // U+0161: "š" LATIN SMALL LETTER S WITH CARON
+                .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
+                // U+00F0: "ð" LATIN SMALL LETTER ETH
+                .setMoreKeysOf("d", "\u00F0")
+                // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
+                .setMoreKeysOf("l", "\u0142")
+                // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+                // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
+                .setMoreKeysOf("n", "\u00F1", "\u0144");
+    }
+}
\ No newline at end of file
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java
new file mode 100644
index 0000000..9adb637
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/FinnishCustomizer.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+class FinnishCustomizer extends EuroCustomizer {
+    public FinnishCustomizer(final Locale locale) { super(locale); }
+
+    protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+        builder
+                // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+                .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
+                // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+                // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+                .replaceKeyOfLabel(Nordic.ROW2_10, "\u00F6")
+                .setMoreKeysOf("\u00F6","\u00F8")
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                // U+00E6: "æ" LATIN SMALL LETTER AE
+                .replaceKeyOfLabel(Nordic.ROW2_11, "\u00E4")
+                .setMoreKeysOf("\u00E4", "\u00E6");
+    }
+
+    @Override
+    public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+        setNordicKeys(builder);
+        return builder
+                // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+                .setMoreKeysOf("u", "\u00FC")
+                // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+                // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+                // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+                // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+                // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+                // U+0153: "œ" LATIN SMALL LIGATURE OE
+                // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+                .setMoreKeysOf("o",
+                        "\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u014D")
+                // U+00E6: "æ" LATIN SMALL LETTER AE
+                // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+                // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+                // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+                // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+                // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
+                .setMoreKeysOf("a", "\u00E6", "\u00E0", "\u00E1", "\u00E2", "\u00E3", "\u0101")
+                // U+0161: "š" LATIN SMALL LETTER S WITH CARON
+                // U+00DF: "ß" LATIN SMALL LETTER SHARP S
+                // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
+                .setMoreKeysOf("s", "\u0161", "\u00DF", "\u015B")
+                // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
+                // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
+                // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
+                .setMoreKeysOf("z", "\u017E", "\u017A", "\u017C");
+    }
+}
\ No newline at end of file
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java
new file mode 100644
index 0000000..3d3ed4b
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/NorwegianCustomizer.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+class NorwegianCustomizer extends LayoutCustomizer {
+    public NorwegianCustomizer(final Locale locale) { super(locale); }
+
+    @Override
+    public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
+
+    @Override
+    public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; }
+
+    protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+        builder
+                // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+                .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
+                // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+                // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+                .replaceKeyOfLabel(Nordic.ROW2_10, "\u00F8")
+                .setMoreKeysOf("\u00F8", "\u00F6")
+                // U+00E6: "æ" LATIN SMALL LETTER AE
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                .replaceKeyOfLabel(Nordic.ROW2_11, "\u00E6")
+                .setMoreKeysOf("\u00E6", "\u00E4");
+    }
+
+    @Override
+    public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+        setNordicKeys(builder);
+        return builder
+                // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+                // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+                // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+                // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+                // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
+                // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
+                // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
+                .setMoreKeysOf("e",
+                        "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
+                // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+                // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+                // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+                // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+                // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
+                .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
+                // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+                // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+                // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+                // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+                // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+                // U+0153: "œ" LATIN SMALL LIGATURE OE
+                // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+                .setMoreKeysOf("o",
+                        "\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153", "\u014D")
+                // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+                // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+                // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+                // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
+                .setMoreKeysOf("a", "\u00E0", "\u00E4", "\u00E1", "\u00E2", "\u00E3", "\u0101");
+    }
+}
\ No newline at end of file
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java
new file mode 100644
index 0000000..36b55b1
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/SwedishCustomizer.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
+import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.Nordic;
+import com.android.inputmethod.keyboard.layout.Symbols;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+class SwedishCustomizer extends LayoutCustomizer {
+    private final LayoutCustomizer mEuroCustomizer;
+
+    public SwedishCustomizer(final Locale locale) {
+        super(locale);
+        mEuroCustomizer = new EuroCustomizer(locale);
+    }
+
+    @Override
+    public ExpectedKey getCurrencyKey() {
+        return mEuroCustomizer.getCurrencyKey();
+    }
+
+    @Override
+    public ExpectedKey[] getOtherCurrencyKeys() {
+        return mEuroCustomizer.getOtherCurrencyKeys();
+    }
+
+    @Override
+    public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
+
+    @Override
+    public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
+
+    protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+        builder
+                // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+                .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
+                // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+                // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+                // U+0153: "œ" LATIN SMALL LIGATURE OE
+                .replaceKeyOfLabel(Nordic.ROW2_10, "\u00F6")
+                .setMoreKeysOf("\u00F6", "\u00F8", "\u0153")
+                // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+                // U+00E6: "æ" LATIN SMALL LETTER AE
+                .replaceKeyOfLabel(Nordic.ROW2_11, "\u00E4")
+                .setMoreKeysOf("\u00E4", "\u00E6");
+    }
+
+    @Override
+    public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
+        setNordicKeys(builder);
+        return builder
+                // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+                // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+                // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+                // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+                // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
+                .setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119")
+                // U+0159: "ř" LATIN SMALL LETTER R WITH CARON
+                .setMoreKeysOf("r", "\u0159")
+                // U+0165: "ť" LATIN SMALL LETTER T WITH CARON
+                // U+00FE: "þ" LATIN SMALL LETTER THORN
+                .setMoreKeysOf("t", "\u0165", "\u00FE")
+                // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
+                // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
+                .setMoreKeysOf("y", "\u00FD", "\u00FF")
+                // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+                // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+                // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+                // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+                // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
+                .setMoreKeysOf("u", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B")
+                // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+                // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
+                // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+                // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+                .setMoreKeysOf("i", "\u00ED", "\u00EC", "\u00EE", "\u00EF")
+                // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+                // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+                // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+                // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+                // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+                .setMoreKeysOf("o", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D")
+                // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+                // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+                // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+                // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
+                // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+                .setMoreKeysOf("a", "\u00E1", "\u00E0", "\u00E2", "\u0105", "\u00E3")
+                // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
+                // U+0161: "š" LATIN SMALL LETTER S WITH CARON
+                // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
+                // U+00DF: "ß" LATIN SMALL LETTER SHARP S
+                .setMoreKeysOf("s", "\u015B", "\u0161", "\u015F", "\u00DF")
+                // U+00F0: "ð" LATIN SMALL LETTER ETH
+                // U+010F: "ď" LATIN SMALL LETTER D WITH CARON
+                .setMoreKeysOf("d", "\u00F0", "\u010F")
+                // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
+                .setMoreKeysOf("l", "\u0142")
+                // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
+                // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
+                // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
+                .setMoreKeysOf("z", "\u017A", "\u017E", "\u017C")
+                // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
+                // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
+                // U+010D: "č" LATIN SMALL LETTER C WITH CARON
+                .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D")
+                // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
+                // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+                // U+0148: "ň" LATIN SMALL LETTER N WITH CARON
+                .setMoreKeysOf("n", "\u0144", "\u00F1", "\u0148");
+    }
+}
\ No newline at end of file
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
index 85c63a1..bf43e52 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java
@@ -19,11 +19,7 @@
 import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
 import com.android.inputmethod.keyboard.layout.Nordic;
-import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 
 import java.util.Locale;
 
@@ -37,73 +33,4 @@
 
     @Override
     LayoutBase getLayout() { return LAYOUT; }
-
-    private static class DanishCustomizer extends EuroCustomizer {
-        public DanishCustomizer(final Locale locale) { super(locale); }
-
-        @Override
-        public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; }
-
-        @Override
-        public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; }
-
-        @Override
-        public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
-
-        @Override
-        public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
-
-        @Override
-        public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
-            return builder
-                    // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
-                    // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
-                    .setMoreKeysOf("e", "\u00E9", "\u00EB")
-                    // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
-                    // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
-                    .setMoreKeysOf("y", "\u00FD", "\u00FF")
-                    // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
-                    // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
-                    // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
-                    // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
-                    // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
-                    .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B")
-                    // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
-                    // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
-                    .setMoreKeysOf("i", "\u00ED", "\u00EF")
-                    // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
-                    // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
-                    // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
-                    // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
-                    // U+0153: "œ" LATIN SMALL LIGATURE OE
-                    // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
-                    .setMoreKeysOf("o", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D")
-                    // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
-                    .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
-                    // U+00E6: "æ" LATIN SMALL LETTER AE
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00E6", moreKey("\u00E4")))
-                    // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
-                    // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
-                    .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00F8", moreKey("\u00F6")))
-                    // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
-                    // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
-                    // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
-                    // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
-                    .setMoreKeysOf("a", "\u00E1", "\u00E4", "\u00E0", "\u00E2", "\u00E3", "\u0101")
-                    // U+00DF: "ß" LATIN SMALL LETTER SHARP S
-                    // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
-                    // U+0161: "š" LATIN SMALL LETTER S WITH CARON
-                    .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161")
-                    // U+00F0: "ð" LATIN SMALL LETTER ETH
-                    .setMoreKeysOf("d", "\u00F0")
-                    // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
-                    .setMoreKeysOf("l", "\u0142")
-                    // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
-                    // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
-                    .setMoreKeysOf("n", "\u00F1", "\u0144");
-        }
-    }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java
new file mode 100644
index 0000000..a53a3d4
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanishQwertz.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.Qwertz;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+/**
+ * da: Danish/qwertz
+ */
+@SmallTest
+public final class TestsDanishQwertz extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("da");
+    private static final LayoutBase LAYOUT = new Qwertz(new DanishQwertyCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+
+    private static class DanishQwertyCustomizer extends DanishCustomizer {
+        public DanishQwertyCustomizer(final Locale locale) {
+            super(locale);
+        }
+
+        @Override
+        protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+            // QWERTZ layout doesn't have Nordic keys.
+        }
+    }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
index ff32da1..05def96 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java
@@ -19,9 +19,7 @@
 import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
 import com.android.inputmethod.keyboard.layout.Nordic;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 
 import java.util.Locale;
 
@@ -35,47 +33,4 @@
 
     @Override
     LayoutBase getLayout() { return LAYOUT; }
-
-    private static class FinnishCustomizer extends EuroCustomizer {
-        public FinnishCustomizer(final Locale locale) { super(locale); }
-
-        @Override
-        public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
-            return builder
-                    // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
-                    .setMoreKeysOf("u", "\u00FC")
-                    // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
-                    // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
-                    // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
-                    // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
-                    // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
-                    // U+0153: "œ" LATIN SMALL LIGATURE OE
-                    // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
-                    .setMoreKeysOf("o",
-                            "\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u014D")
-                    // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
-                    .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
-                    // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
-                    // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
-                    .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", moreKey("\u00F8")))
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    // U+00E6: "æ" LATIN SMALL LETTER AE
-                    .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4", moreKey("\u00E6")))
-                    // U+00E6: "æ" LATIN SMALL LETTER AE
-                    // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
-                    // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
-                    // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
-                    // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
-                    // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
-                    .setMoreKeysOf("a", "\u00E6", "\u00E0", "\u00E1", "\u00E2", "\u00E3", "\u0101")
-                    // U+0161: "š" LATIN SMALL LETTER S WITH CARON
-                    // U+00DF: "ß" LATIN SMALL LETTER SHARP S
-                    // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
-                    .setMoreKeysOf("s", "\u0161", "\u00DF", "\u015B")
-                    // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
-                    // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
-                    // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
-                    .setMoreKeysOf("z", "\u017E", "\u017A", "\u017C");
-        }
-    }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java
new file mode 100644
index 0000000..2838fef
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnishQwerty.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.Qwerty;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+/**
+ * fi: Finnish/qwerty
+ */
+@SmallTest
+public final class TestsFinnishQwerty extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("fi");
+    private static final LayoutBase LAYOUT = new Qwerty(new FinnishQwertyCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+
+    private static class FinnishQwertyCustomizer extends FinnishCustomizer {
+        public FinnishQwertyCustomizer(final Locale locale) {
+            super(locale);
+        }
+
+        @Override
+        protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+            // QWERTY layout doesn't have Nordic keys.
+        }
+    }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
index 5d220df..6c1921a 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java
@@ -19,11 +19,7 @@
 import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
 import com.android.inputmethod.keyboard.layout.Nordic;
-import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 
 import java.util.Locale;
 
@@ -37,58 +33,4 @@
 
     @Override
     LayoutBase getLayout() { return LAYOUT; }
-
-    private static class NorwegianCustomizer extends LayoutCustomizer {
-        public NorwegianCustomizer(final Locale locale) { super(locale); }
-
-        @Override
-        public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; }
-
-        @Override
-        public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; }
-
-        @Override
-        public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
-            return builder
-                    // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
-                    // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
-                    // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
-                    // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
-                    // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
-                    // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
-                    // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON
-                    .setMoreKeysOf("e",
-                            "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113")
-                    // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
-                    // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
-                    // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
-                    // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
-                    // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
-                    .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B")
-                    // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
-                    // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
-                    // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
-                    // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
-                    // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
-                    // U+0153: "œ" LATIN SMALL LIGATURE OE
-                    // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
-                    .setMoreKeysOf("o",
-                            "\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153", "\u014D")
-                    // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
-                    .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
-                    // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
-                    // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
-                    .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F8", moreKey("\u00F6")))
-                    // U+00E6: "æ" LATIN SMALL LETTER AE
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E6", moreKey("\u00E4")))
-                    // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
-                    // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
-                    // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
-                    // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
-                    .setMoreKeysOf("a", "\u00E0", "\u00E4", "\u00E1", "\u00E2", "\u00E3", "\u0101");
-        }
-    }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java
new file mode 100644
index 0000000..6c3f8b9
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegianColemak.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.Colemak;
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+/**
+ * nb: Norwegian Bokmål/colemak
+ */
+@SmallTest
+public final class TestsNorwegianColemak extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("nb");
+    private static final LayoutBase LAYOUT = new Colemak(new NorwegianColemakCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+
+    private static class NorwegianColemakCustomizer extends NorwegianCustomizer {
+        public NorwegianColemakCustomizer(final Locale locale) {
+            super(locale);
+        }
+
+        @Override
+        protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+            // Colemak layout doesn't have Nordic keys.
+        }
+    }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
index 9b58914..79cb3dc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java
@@ -19,11 +19,7 @@
 import android.test.suitebuilder.annotation.SmallTest;
 
 import com.android.inputmethod.keyboard.layout.LayoutBase;
-import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer;
 import com.android.inputmethod.keyboard.layout.Nordic;
-import com.android.inputmethod.keyboard.layout.Symbols;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
-import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
 
 import java.util.Locale;
 
@@ -37,88 +33,4 @@
 
     @Override
     LayoutBase getLayout() { return LAYOUT; }
-
-    private static class SwedishCustomizer extends EuroCustomizer {
-        public SwedishCustomizer(final Locale locale) { super(locale); }
-
-        @Override
-        public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; }
-
-        @Override
-        public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; }
-
-        @Override
-        public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) {
-            return builder
-                    // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
-                    // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
-                    // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
-                    // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
-                    // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
-                    .setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119")
-                    // U+0159: "ř" LATIN SMALL LETTER R WITH CARON
-                    .setMoreKeysOf("r", "\u0159")
-                    // U+0165: "ť" LATIN SMALL LETTER T WITH CARON
-                    // U+00FE: "þ" LATIN SMALL LETTER THORN
-                    .setMoreKeysOf("t", "\u0165", "\u00FE")
-                    // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
-                    // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
-                    .setMoreKeysOf("y", "\u00FD", "\u00FF")
-                    // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
-                    // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
-                    // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
-                    // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
-                    // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
-                    .setMoreKeysOf("u", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B")
-                    // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
-                    // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
-                    // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
-                    // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
-                    .setMoreKeysOf("i", "\u00ED", "\u00EC", "\u00EE", "\u00EF")
-                    // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
-                    // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
-                    // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
-                    // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
-                    // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
-                    .setMoreKeysOf("o", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D")
-                    // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
-                    .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5")
-                    // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
-                    // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
-                    // U+0153: "œ" LATIN SMALL LIGATURE OE
-                    .replaceKeyOfLabel(Nordic.ROW2_10,
-                            key("\u00F6", joinMoreKeys("\u00F8", "\u0153")))
-                    // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
-                    // U+00E6: "æ" LATIN SMALL LETTER AE
-                    .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4", moreKey("\u00E6")))
-                    // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
-                    // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
-                    // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
-                    // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
-                    // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
-                    .setMoreKeysOf("a", "\u00E1", "\u00E0", "\u00E2", "\u0105", "\u00E3")
-                    // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
-                    // U+0161: "š" LATIN SMALL LETTER S WITH CARON
-                    // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
-                    // U+00DF: "ß" LATIN SMALL LETTER SHARP S
-                    .setMoreKeysOf("s", "\u015B", "\u0161", "\u015F", "\u00DF")
-                    // U+00F0: "ð" LATIN SMALL LETTER ETH
-                    // U+010F: "ď" LATIN SMALL LETTER D WITH CARON
-                    .setMoreKeysOf("d", "\u00F0", "\u010F")
-                    // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
-                    .setMoreKeysOf("l", "\u0142")
-                    // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
-                    // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
-                    // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
-                    .setMoreKeysOf("z", "\u017A", "\u017E", "\u017C")
-                    // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
-                    // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
-                    // U+010D: "č" LATIN SMALL LETTER C WITH CARON
-                    .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D")
-                    // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
-                    // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
-                    // U+0148: "ň" LATIN SMALL LETTER N WITH CARON
-                    .setMoreKeysOf("n", "\u0144", "\u00F1", "\u0148");
-        }
-    }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java
new file mode 100644
index 0000000..bb4b9dd
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedishPcQwerty.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer;
+import com.android.inputmethod.keyboard.layout.PcQwerty;
+import com.android.inputmethod.keyboard.layout.PcQwerty.PcQwertyCustomizer;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+
+import java.util.Locale;
+
+/**
+ * sv: Swedish/pcqwerty
+ */
+@SmallTest
+public final class TestsSwedishPcQwerty extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("sv");
+    private static final LayoutBase LAYOUT = new PcQwerty(new SwedishPcQwertyCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+
+    private static class SwedishPcQwertyCustomizer extends SwedishCustomizer {
+        private final LayoutCustomizer mPcQwertyCustomizer;
+
+        public SwedishPcQwertyCustomizer(final Locale locale) {
+            super(locale);
+            mPcQwertyCustomizer = new PcQwertyCustomizer(locale);
+        }
+
+        @Override
+        public ExpectedKey getCurrencyKey() {
+            return mPcQwertyCustomizer.getCurrencyKey();
+        }
+
+        @Override
+        public ExpectedKey[] getOtherCurrencyKeys() {
+            return mPcQwertyCustomizer.getOtherCurrencyKeys();
+        }
+
+        @Override
+        public int getNumberOfRows() {
+            return mPcQwertyCustomizer.getNumberOfRows();
+        }
+
+        @Override
+        public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+            return mPcQwertyCustomizer.getLeftShiftKeys(isPhone);
+        }
+
+        @Override
+        public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+            return mPcQwertyCustomizer.getRightShiftKeys(isPhone);
+        }
+
+        @Override
+        public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
+            return mPcQwertyCustomizer.getKeysLeftToSpacebar(isPhone);
+        }
+
+        @Override
+        public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
+            return mPcQwertyCustomizer.getKeysRightToSpacebar(isPhone);
+        }
+
+        @Override
+        protected void setNordicKeys(final ExpectedKeyboardBuilder builder) {
+            // PC QWERTY layout doesn't have Nordic keys.
+        }
+    }
+}
