Add allowRedundantMoreKeys attribute
This CL also adds a couple of custom layout tests of Nordic languages.
Bug: 10787354
Change-Id: I5e875d3f30863395511afa82f0a02deb093d3a6f
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" />