Merge "Write the bigram frequency following the new formula" into jb-dev
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 73aa54f..d6a68d0 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -178,6 +178,9 @@
     <string name="subtype_generic_colemak">%s (Colemak)</string>
     <string name="subtype_generic_pcqwerty">%s (PC)</string>
 
+    <!-- Description for Bulgarian (BDS) subtype. -->
+    <string name="subtype_bulgarian_bds">%s (BDS)</string>
+
     <!-- dictionary pack package name /settings activity (for shared prefs and settings) -->
     <string name="dictionary_pack_package_name">com.google.android.inputmethod.latin.dictionarypack</string>
     <string name="dictionary_pack_settings_activity">com.google.android.inputmethod.latin.dictionarypack.DictionarySettingsActivity</string>
diff --git a/java/res/xml-sw600dp/key_dash.xml b/java/res/xml-sw600dp/key_dash.xml
index a7c3727..f7e0b34 100644
--- a/java/res/xml-sw600dp/key_dash.xml
+++ b/java/res/xml-sw600dp/key_dash.xml
@@ -28,11 +28,21 @@
             <Key
                 latin:keyLabel="_" />
         </case>
+        <case
+            latin:languageCode="ar|fa"
+        >
+            <!-- U+064B: "ً" ARABIC FATHATAN -->
+            <Key
+                latin:keyLabel="."
+                latin:keyHintLabel="&#x064B;"
+                latin:moreKeys="!text/more_keys_for_arabic_diacritics"
+                latin:keyStyle="hasShiftedLetterHintStyle" />
+        </case>
         <default>
             <Key
-                latin:keyLabel="!text/keylabel_for_dash"
-                latin:keyHintLabel="!text/keyhintlabel_for_dash"
-                latin:moreKeys="!text/more_keys_for_dash"
+                latin:keyLabel="-"
+                latin:keyHintLabel="_"
+                latin:moreKeys="_"
                 latin:keyStyle="hasShiftedLetterHintStyle" />
         </default>
     </switch>
diff --git a/java/res/xml-sw600dp/rowkeys_symbols3.xml b/java/res/xml-sw600dp/rowkeys_symbols3.xml
index 4eb9618..4bfa0d7 100644
--- a/java/res/xml-sw600dp/rowkeys_symbols3.xml
+++ b/java/res/xml-sw600dp/rowkeys_symbols3.xml
@@ -48,10 +48,9 @@
         latin:moreKeys="!text/more_keys_for_comma" />
     <Key
         latin:keyLabel="." />
-    <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK -->
     <Key
-        latin:keyLabel="!"
-        latin:moreKeys="&#x00A1;" />
+        latin:keyLabel="!text/keylabel_for_symbols_exclamation"
+        latin:moreKeys="!text/more_keys_for_symbols_exclamation" />
     <Key
         latin:keyLabel="!text/keylabel_for_symbols_question"
         latin:moreKeys="!text/more_keys_for_symbols_question" />
diff --git a/java/res/xml-sw600dp/rows_bulgarian_bds.xml b/java/res/xml-sw600dp/rows_bulgarian_bds.xml
new file mode 100644
index 0000000..8632964
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_bulgarian_bds.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="7.727%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds1"
+            latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillBoth" />
+    </Row>
+    <Row
+        latin:keyWidth="7.727%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds2" />
+        <Key
+            latin:keyStyle="enterKeyStyle"
+            latin:keyWidth="fillBoth" />
+    </Row>
+    <Row
+        latin:keyWidth="7.65%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="11.75%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds3" />
+        <include
+            latin:keyboardLayout="@xml/keys_comma_period" />
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw768dp/rows_bulgarian_bds.xml b/java/res/xml-sw768dp/rows_bulgarian_bds.xml
new file mode 100644
index 0000000..31343d2
--- /dev/null
+++ b/java/res/xml-sw768dp/rows_bulgarian_bds.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="7.000%p"
+    >
+        <Key
+            latin:keyStyle="tabKeyStyle"
+            latin:keyLabelFlags="alignLeft"
+            latin:keyWidth="7.969%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds1"
+            latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillBoth" />
+    </Row>
+    <Row
+        latin:keyWidth="7.000%p"
+    >
+        <Key
+            latin:keyStyle="toSymbolKeyStyle"
+            latin:keyLabelFlags="alignLeft"
+            latin:keyWidth="11.172%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds2" />
+        <Key
+            latin:keyStyle="enterKeyStyle"
+            latin:keyWidth="fillBoth" />
+    </Row>
+    <Row
+        latin:keyWidth="7.000%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="13.829%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds3" />
+        <include
+            latin:keyboardLayout="@xml/keys_comma_period" />
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="fillBoth" />
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_bulgarian_bds.xml b/java/res/xml/kbd_bulgarian_bds.xml
new file mode 100644
index 0000000..a8d770c
--- /dev/null
+++ b/java/res/xml/kbd_bulgarian_bds.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<Keyboard
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/rows_bulgarian_bds" />
+</Keyboard>
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index 6b64985..819cdc6 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -201,7 +201,6 @@
     <key-style
         latin:styleName="punctuationKeyStyle"
         latin:keyLabel="."
-        latin:keyHintLabel="!text/keyhintlabel_for_punctuation"
         latin:keyLabelFlags="hasPopupHint"
         latin:moreKeys="!text/more_keys_for_punctuation"
         latin:backgroundType="functional" />
diff --git a/java/res/xml/keyboard_layout_set_bulgarian_bds.xml b/java/res/xml/keyboard_layout_set_bulgarian_bds.xml
new file mode 100644
index 0000000..a36b3bd
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_bulgarian_bds.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<KeyboardLayoutSet
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Element
+        latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_bulgarian_bds"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="symbols"
+        latin:elementKeyboard="@xml/kbd_symbols" />
+    <Element
+        latin:elementName="symbolsShifted"
+        latin:elementKeyboard="@xml/kbd_symbols_shift" />
+    <Element
+        latin:elementName="phone"
+        latin:elementKeyboard="@xml/kbd_phone" />
+    <Element
+        latin:elementName="phoneSymbols"
+        latin:elementKeyboard="@xml/kbd_phone_symbols" />
+    <Element
+        latin:elementName="number"
+        latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardLayoutSet>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 981f246..19b32f2 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -25,6 +25,7 @@
     ar: Arabic/arabic
     be: Belarusian/east_slavic
     bg: Bulgarian/bulgarian
+    bg: Bulgarian/bulgarian_bds
     cs: Czech/qwertz
     da: Danish/nordic
     de: German/qwertz
@@ -101,6 +102,12 @@
             android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
+            android:label="@string/subtype_bulgarian_bds"
+            android:imeSubtypeLocale="bg"
+            android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian_bds"
+    />
+    <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="cs"
             android:imeSubtypeMode="keyboard"
diff --git a/java/res/xml/row_qwerty4.xml b/java/res/xml/row_qwerty4.xml
index 6780349..ecb95e7 100644
--- a/java/res/xml/row_qwerty4.xml
+++ b/java/res/xml/row_qwerty4.xml
@@ -32,8 +32,23 @@
         <include
             latin:keyXPos="25%p"
             latin:keyboardLayout="@xml/key_space" />
-        <Key
-            latin:keyStyle="punctuationKeyStyle" />
+        <switch>
+            <case
+                latin:languageCode="ar|fa"
+            >
+                <!-- U+064B: "ً" ARABIC FATHATAN -->
+                <Key
+                    latin:keyLabel="."
+                    latin:keyHintLabel="&#x064B;"
+                    latin:keyLabelFlags="hasPopupHint|hasShiftedLetterHint"
+                    latin:moreKeys="!text/more_keys_for_arabic_diacritics"
+                    latin:backgroundType="functional" />
+            </case>
+            <default>
+                <Key
+                latin:keyStyle="punctuationKeyStyle" />
+            </default>
+        </switch>
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillRight" />
diff --git a/java/res/xml/rowkeys_bulgarian1.xml b/java/res/xml/rowkeys_bulgarian1.xml
index adeecaf..441b079 100644
--- a/java/res/xml/rowkeys_bulgarian1.xml
+++ b/java/res/xml/rowkeys_bulgarian1.xml
@@ -21,14 +21,14 @@
 <merge
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
-    <!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
+    <!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
     <Key
-        latin:keyLabel="&#x0447;"
+        latin:keyLabel="&#x044F;"
         latin:keyHintLabel="1"
         latin:additionalMoreKeys="1" />
-    <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
+    <!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
     <Key
-        latin:keyLabel="&#x0448;"
+        latin:keyLabel="&#x0432;"
         latin:keyHintLabel="2"
         latin:additionalMoreKeys="2" />
     <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
@@ -73,7 +73,7 @@
         latin:keyLabel="&#x043F;"
         latin:keyHintLabel="0"
         latin:additionalMoreKeys="0" />
-    <!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
+    <!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
     <Key
-        latin:keyLabel="&#x044F;" />
+        latin:keyLabel="&#x0447;" />
 </merge>
diff --git a/java/res/xml/rowkeys_bulgarian2.xml b/java/res/xml/rowkeys_bulgarian2.xml
index 599edd3..a4e93d8 100644
--- a/java/res/xml/rowkeys_bulgarian2.xml
+++ b/java/res/xml/rowkeys_bulgarian2.xml
@@ -48,10 +48,10 @@
     <!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
     <Key
         latin:keyLabel="&#x043B;" />
+    <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
+    <Key
+        latin:keyLabel="&#x0448;" />
     <!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
     <Key
         latin:keyLabel="&#x0449;" />
-    <!-- U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN -->
-    <Key
-        latin:keyLabel="&#x044C;" />
 </merge>
diff --git a/java/res/xml/rowkeys_bulgarian3.xml b/java/res/xml/rowkeys_bulgarian3.xml
index 19872cd..258219c 100644
--- a/java/res/xml/rowkeys_bulgarian3.xml
+++ b/java/res/xml/rowkeys_bulgarian3.xml
@@ -24,15 +24,15 @@
     <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
     <Key
         latin:keyLabel="&#x0437;" />
-    <!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
+    <!-- U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN -->
     <Key
-        latin:keyLabel="&#x0436;" />
+        latin:keyLabel="&#x044C;" />
     <!-- U+0446: "ц" CYRILLIC SMALL LETTER TSE -->
     <Key
         latin:keyLabel="&#x0446;" />
-    <!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
+    <!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
     <Key
-        latin:keyLabel="&#x0432;" />
+        latin:keyLabel="&#x0436;" />
     <!-- U+0431: "б" CYRILLIC SMALL LETTER BE -->
     <Key
         latin:keyLabel="&#x0431;" />
diff --git a/java/res/xml/rowkeys_bulgarian_bds1.xml b/java/res/xml/rowkeys_bulgarian_bds1.xml
new file mode 100644
index 0000000..eed1fcb
--- /dev/null
+++ b/java/res/xml/rowkeys_bulgarian_bds1.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
+    <Key
+        latin:keyLabel="&#x0443;"
+        latin:keyHintLabel="1"
+        latin:additionalMoreKeys="1" />
+    <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
+    <Key
+        latin:keyLabel="&#x0435;"
+        latin:keyHintLabel="2"
+        latin:additionalMoreKeys="2" />
+    <!-- U+0438: "и" CYRILLIC SMALL LETTER I
+         U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE -->
+    <Key
+        latin:keyLabel="&#x0438;"
+        latin:keyHintLabel="3"
+        latin:additionalMoreKeys="3"
+        latin:moreKeys="&#x045D;" />
+    <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
+    <Key
+        latin:keyLabel="&#x0448;"
+        latin:keyHintLabel="4"
+        latin:additionalMoreKeys="4" />
+    <!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
+    <Key
+        latin:keyLabel="&#x0449;"
+        latin:keyHintLabel="5"
+        latin:additionalMoreKeys="5" />
+    <!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
+    <Key
+        latin:keyLabel="&#x043A;"
+        latin:keyHintLabel="6"
+        latin:additionalMoreKeys="6" />
+    <!-- U+0441: "с" CYRILLIC SMALL LETTER ES -->
+    <Key
+        latin:keyLabel="&#x0441;"
+        latin:keyHintLabel="7"
+        latin:additionalMoreKeys="7" />
+    <!-- U+0434: "д" CYRILLIC SMALL LETTER DE -->
+    <Key
+        latin:keyLabel="&#x0434;"
+        latin:keyHintLabel="8"
+        latin:additionalMoreKeys="8" />
+    <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
+    <Key
+        latin:keyLabel="&#x0437;"
+        latin:keyHintLabel="9"
+        latin:additionalMoreKeys="9" />
+    <!-- U+0446: "ц" CYRILLIC SMALL LETTER TSE -->
+    <Key
+        latin:keyLabel="&#x0446;"
+        latin:keyHintLabel="0"
+        latin:additionalMoreKeys="0" />
+    <!-- U+0431: "б" CYRILLIC SMALL LETTER BE -->
+    <Key
+        latin:keyLabel="&#x0431;" />
+</merge>
diff --git a/java/res/xml/rowkeys_bulgarian_bds2.xml b/java/res/xml/rowkeys_bulgarian_bds2.xml
new file mode 100644
index 0000000..ff1bff8
--- /dev/null
+++ b/java/res/xml/rowkeys_bulgarian_bds2.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <!-- U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN -->
+    <Key
+        latin:keyLabel="&#x044C;" />
+    <!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
+    <Key
+        latin:keyLabel="&#x044F;" />
+    <!-- U+0430: "а" CYRILLIC SMALL LETTER A -->
+    <Key
+        latin:keyLabel="&#x0430;" />
+    <!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
+    <Key
+        latin:keyLabel="&#x043E;" />
+    <!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
+    <Key
+        latin:keyLabel="&#x0436;" />
+    <!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
+    <Key
+        latin:keyLabel="&#x0433;" />
+    <!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
+    <Key
+        latin:keyLabel="&#x0442;" />
+    <!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
+    <Key
+        latin:keyLabel="&#x043D;" />
+    <!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
+    <Key
+        latin:keyLabel="&#x0432;" />
+    <!-- U+043C: "м" CYRILLIC SMALL LETTER EM -->
+    <Key
+        latin:keyLabel="&#x043C;" />
+    <!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
+    <Key
+        latin:keyLabel="&#x0447;" />
+</merge>
diff --git a/java/res/xml/rowkeys_bulgarian_bds3.xml b/java/res/xml/rowkeys_bulgarian_bds3.xml
new file mode 100644
index 0000000..7bb780a
--- /dev/null
+++ b/java/res/xml/rowkeys_bulgarian_bds3.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <!-- U+044E: "ю" CYRILLIC SMALL LETTER YU -->
+    <Key
+        latin:keyLabel="&#x044E;" />
+    <!-- U+0439: "й" CYRILLIC SMALL LETTER SHORT I -->
+    <Key
+        latin:keyLabel="&#x0439;" />
+    <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
+    <Key
+        latin:keyLabel="&#x044A;" />
+    <!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
+    <Key
+        latin:keyLabel="&#x044D;" />
+    <!-- U+0444: "ф" CYRILLIC SMALL LETTER EF -->
+    <Key
+        latin:keyLabel="&#x0444;" />
+    <!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
+    <Key
+        latin:keyLabel="&#x0445;" />
+    <!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
+    <Key
+        latin:keyLabel="&#x043F;" />
+    <!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
+    <Key
+        latin:keyLabel="&#x0440;" />
+    <!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
+    <Key
+        latin:keyLabel="&#x043B;" />
+</merge>
diff --git a/java/res/xml/rowkeys_symbols3.xml b/java/res/xml/rowkeys_symbols3.xml
index 0518c19..2b2d9a4 100644
--- a/java/res/xml/rowkeys_symbols3.xml
+++ b/java/res/xml/rowkeys_symbols3.xml
@@ -21,10 +21,9 @@
 <merge
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
-    <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK -->
     <Key
-        latin:keyLabel="!"
-        latin:moreKeys="&#x00A1;" />
+        latin:keyLabel="!text/keylabel_for_symbols_exclamation"
+        latin:moreKeys="!text/more_keys_for_symbols_exclamation" />
     <Key
         latin:keyLabel="&quot;"
         latin:moreKeys="!text/more_keys_for_double_quote" />
diff --git a/java/res/xml/rows_bulgarian_bds.xml b/java/res/xml/rows_bulgarian_bds.xml
new file mode 100644
index 0000000..9a2f0bc
--- /dev/null
+++ b/java/res/xml/rows_bulgarian_bds.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="9.091%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds1" />
+    </Row>
+    <Row
+            latin:keyWidth="9.091%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds2" />
+    </Row>
+    <Row
+        latin:keyWidth="9.091%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="10.8%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_bulgarian_bds3" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
index 6b59a8d..90394ce 100644
--- a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
+++ b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
@@ -21,7 +21,6 @@
 
 import com.android.inputmethod.keyboard.Keyboard.Params.TouchPositionCorrection;
 import com.android.inputmethod.latin.JniUtils;
-import com.android.inputmethod.latin.spellcheck.SpellCheckerProximityInfo;
 
 import java.util.Arrays;
 import java.util.HashMap;
@@ -75,15 +74,12 @@
         return new ProximityInfo("", 1, 1, 1, 1, 1, 1, EMPTY_KEY_ARRAY, null);
     }
 
-    public static ProximityInfo createSpellCheckerProximityInfo(final int[] proximity) {
+    public static ProximityInfo createSpellCheckerProximityInfo(final int[] proximity,
+            int rowSize, int gridWidth, int gridHeight) {
         final ProximityInfo spellCheckerProximityInfo = createDummyProximityInfo();
         spellCheckerProximityInfo.mNativeProximityInfo =
                 spellCheckerProximityInfo.setProximityInfoNative("",
-                        SpellCheckerProximityInfo.ROW_SIZE,
-                        SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH,
-                        SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT,
-                        SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH,
-                        SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT,
+                        rowSize, gridWidth, gridHeight, gridWidth, gridHeight,
                         1, proximity, 0, null, null, null, null, null, null, null, null);
         return spellCheckerProximityInfo;
     }
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
index 1b51675..425b5e0 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
@@ -161,80 +161,79 @@
         /* 45 */ "more_keys_for_currency_euro",
         /* 46 */ "more_keys_for_currency_pound",
         /* 47 */ "more_keys_for_currency_general",
-        /* 48 */ "more_keys_for_smiley",
-        /* 49 */ "more_keys_for_punctuation",
-        /* 50 */ "keyhintlabel_for_punctuation",
-        /* 51 */ "more_keys_for_star",
-        /* 52 */ "more_keys_for_plus",
-        /* 53 */ "more_keys_for_left_parenthesis",
-        /* 54 */ "more_keys_for_right_parenthesis",
-        /* 55 */ "more_keys_for_less_than",
-        /* 56 */ "more_keys_for_greater_than",
-        /* 57 */ "keylabel_for_popular_domain",
-        /* 58 */ "more_keys_for_popular_domain",
-        /* 59 */ "keylabel_for_symbols_1",
-        /* 60 */ "keylabel_for_symbols_2",
-        /* 61 */ "keylabel_for_symbols_3",
-        /* 62 */ "keylabel_for_symbols_4",
-        /* 63 */ "keylabel_for_symbols_5",
-        /* 64 */ "keylabel_for_symbols_6",
-        /* 65 */ "keylabel_for_symbols_7",
-        /* 66 */ "keylabel_for_symbols_8",
-        /* 67 */ "keylabel_for_symbols_9",
-        /* 68 */ "keylabel_for_symbols_0",
-        /* 69 */ "additional_more_keys_for_symbols_1",
-        /* 70 */ "additional_more_keys_for_symbols_2",
-        /* 71 */ "additional_more_keys_for_symbols_3",
-        /* 72 */ "additional_more_keys_for_symbols_4",
-        /* 73 */ "additional_more_keys_for_symbols_5",
-        /* 74 */ "additional_more_keys_for_symbols_6",
-        /* 75 */ "additional_more_keys_for_symbols_7",
-        /* 76 */ "additional_more_keys_for_symbols_8",
-        /* 77 */ "additional_more_keys_for_symbols_9",
-        /* 78 */ "additional_more_keys_for_symbols_0",
-        /* 79 */ "more_keys_for_symbols_1",
-        /* 80 */ "more_keys_for_symbols_2",
-        /* 81 */ "more_keys_for_symbols_3",
-        /* 82 */ "more_keys_for_symbols_4",
-        /* 83 */ "more_keys_for_symbols_5",
-        /* 84 */ "more_keys_for_symbols_6",
-        /* 85 */ "more_keys_for_symbols_7",
-        /* 86 */ "more_keys_for_symbols_8",
-        /* 87 */ "more_keys_for_symbols_9",
-        /* 88 */ "more_keys_for_symbols_0",
-        /* 89 */ "keylabel_for_comma",
-        /* 90 */ "more_keys_for_comma",
-        /* 91 */ "keylabel_for_symbols_question",
-        /* 92 */ "keylabel_for_symbols_semicolon",
-        /* 93 */ "keylabel_for_symbols_percent",
-        /* 94 */ "more_keys_for_symbols_question",
-        /* 95 */ "more_keys_for_symbols_semicolon",
-        /* 96 */ "more_keys_for_symbols_percent",
-        /* 97 */ "keylabel_for_tablet_comma",
-        /* 98 */ "keyhintlabel_for_tablet_comma",
-        /* 99 */ "more_keys_for_tablet_comma",
-        /* 100 */ "keyhintlabel_for_tablet_period",
-        /* 101 */ "more_keys_for_tablet_period",
-        /* 102 */ "keylabel_for_apostrophe",
-        /* 103 */ "keylabel_for_dash",
-        /* 104 */ "keyhintlabel_for_apostrophe",
-        /* 105 */ "keyhintlabel_for_dash",
-        /* 106 */ "more_keys_for_apostrophe",
-        /* 107 */ "more_keys_for_dash",
-        /* 108 */ "more_keys_for_bullet",
-        /* 109 */ "more_keys_for_am_pm",
-        /* 110 */ "settings_as_more_key",
-        /* 111 */ "shortcut_as_more_key",
-        /* 112 */ "action_next_as_more_key",
-        /* 113 */ "action_previous_as_more_key",
-        /* 114 */ "label_to_more_symbol_key",
-        /* 115 */ "label_to_more_symbol_for_tablet_key",
-        /* 116 */ "label_tab_key",
-        /* 117 */ "label_to_phone_numeric_key",
-        /* 118 */ "label_to_phone_symbols_key",
-        /* 119 */ "label_time_am",
-        /* 120 */ "label_time_pm",
-        /* 121 */ "label_to_symbol_key_pcqwerty",
+        /* 48 */ "more_keys_for_punctuation",
+        /* 49 */ "more_keys_for_star",
+        /* 50 */ "more_keys_for_bullet",
+        /* 51 */ "more_keys_for_plus",
+        /* 52 */ "more_keys_for_left_parenthesis",
+        /* 53 */ "more_keys_for_right_parenthesis",
+        /* 54 */ "more_keys_for_less_than",
+        /* 55 */ "more_keys_for_greater_than",
+        /* 56 */ "keylabel_for_symbols_1",
+        /* 57 */ "keylabel_for_symbols_2",
+        /* 58 */ "keylabel_for_symbols_3",
+        /* 59 */ "keylabel_for_symbols_4",
+        /* 60 */ "keylabel_for_symbols_5",
+        /* 61 */ "keylabel_for_symbols_6",
+        /* 62 */ "keylabel_for_symbols_7",
+        /* 63 */ "keylabel_for_symbols_8",
+        /* 64 */ "keylabel_for_symbols_9",
+        /* 65 */ "keylabel_for_symbols_0",
+        /* 66 */ "additional_more_keys_for_symbols_1",
+        /* 67 */ "additional_more_keys_for_symbols_2",
+        /* 68 */ "additional_more_keys_for_symbols_3",
+        /* 69 */ "additional_more_keys_for_symbols_4",
+        /* 70 */ "additional_more_keys_for_symbols_5",
+        /* 71 */ "additional_more_keys_for_symbols_6",
+        /* 72 */ "additional_more_keys_for_symbols_7",
+        /* 73 */ "additional_more_keys_for_symbols_8",
+        /* 74 */ "additional_more_keys_for_symbols_9",
+        /* 75 */ "additional_more_keys_for_symbols_0",
+        /* 76 */ "more_keys_for_symbols_1",
+        /* 77 */ "more_keys_for_symbols_2",
+        /* 78 */ "more_keys_for_symbols_3",
+        /* 79 */ "more_keys_for_symbols_4",
+        /* 80 */ "more_keys_for_symbols_5",
+        /* 81 */ "more_keys_for_symbols_6",
+        /* 82 */ "more_keys_for_symbols_7",
+        /* 83 */ "more_keys_for_symbols_8",
+        /* 84 */ "more_keys_for_symbols_9",
+        /* 85 */ "more_keys_for_symbols_0",
+        /* 86 */ "keylabel_for_comma",
+        /* 87 */ "more_keys_for_comma",
+        /* 88 */ "keylabel_for_symbols_exclamation",
+        /* 89 */ "keylabel_for_symbols_question",
+        /* 90 */ "keylabel_for_symbols_semicolon",
+        /* 91 */ "keylabel_for_symbols_percent",
+        /* 92 */ "more_keys_for_symbols_exclamation",
+        /* 93 */ "more_keys_for_symbols_question",
+        /* 94 */ "more_keys_for_symbols_semicolon",
+        /* 95 */ "more_keys_for_symbols_percent",
+        /* 96 */ "keylabel_for_tablet_comma",
+        /* 97 */ "keyhintlabel_for_tablet_comma",
+        /* 98 */ "more_keys_for_tablet_comma",
+        /* 99 */ "keyhintlabel_for_tablet_period",
+        /* 100 */ "more_keys_for_tablet_period",
+        /* 101 */ "keylabel_for_apostrophe",
+        /* 102 */ "keyhintlabel_for_apostrophe",
+        /* 103 */ "more_keys_for_apostrophe",
+        /* 104 */ "more_keys_for_am_pm",
+        /* 105 */ "settings_as_more_key",
+        /* 106 */ "shortcut_as_more_key",
+        /* 107 */ "action_next_as_more_key",
+        /* 108 */ "action_previous_as_more_key",
+        /* 109 */ "label_to_more_symbol_key",
+        /* 110 */ "label_to_more_symbol_for_tablet_key",
+        /* 111 */ "label_tab_key",
+        /* 112 */ "label_to_phone_numeric_key",
+        /* 113 */ "label_to_phone_symbols_key",
+        /* 114 */ "label_time_am",
+        /* 115 */ "label_time_pm",
+        /* 116 */ "label_to_symbol_key_pcqwerty",
+        /* 117 */ "keylabel_for_popular_domain",
+        /* 118 */ "more_keys_for_popular_domain",
+        /* 119 */ "more_keys_for_smiley",
+        /* 120 */ "more_keys_for_arabic_diacritics",
     };
 
     private static final String EMPTY = "";
@@ -263,19 +262,23 @@
         /* 45 */ "\u00A2,\u00A3,$,\u00A5,\u20B1",
         /* 46 */ "\u00A2,$,\u20AC,\u00A5,\u20B1",
         /* 47 */ "\u00A2,$,\u20AC,\u00A3,\u00A5,\u20B1",
-        /* 48 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ",
-        /* 49 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\\,,?,@,&,\\%,+,;,/,(,)",
-        /* 50 */ EMPTY,
+        /* 48 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\\,,?,@,&,\\%,+,;,/,(,)",
         // U+2020: "†" DAGGER
         // U+2021: "‡" DOUBLE DAGGER
         // U+2605: "★" BLACK STAR
-        /* 51 */ "\u2020,\u2021,\u2605",
+        /* 49 */ "\u2020,\u2021,\u2605",
+        // U+266A: "♪" EIGHTH NOTE
+        // U+2665: "♥" BLACK HEART SUIT
+        // U+2660: "♠" BLACK SPADE SUIT
+        // U+2666: "♦" BLACK DIAMOND SUIT
+        // U+2663: "♣" BLACK CLUB SUIT
+        /* 50 */ "\u266A,\u2665,\u2660,\u2666,\u2663",
         // U+00B1: "±" PLUS-MINUS SIGN
-        /* 52 */ "\u00B1",
+        /* 51 */ "\u00B1",
         // The all letters need to be mirrored are found at
         // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
-        /* 53 */ "!fixedColumnOrder!3,<,{,[",
-        /* 54 */ "!fixedColumnOrder!3,>,},]",
+        /* 52 */ "!fixedColumnOrder!3,<,{,[",
+        /* 53 */ "!fixedColumnOrder!3,>,},]",
         // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
         // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
         // U+2264: "≤" LESS-THAN OR EQUAL TO
@@ -291,99 +294,110 @@
         // U+201D: "”" RIGHT DOUBLE QUOTATION MARK
         // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
         // U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK
-        /* 55 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB",
-        /* 56 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB",
-        /* 57 */ ".com",
-        // popular web domains for the locale - most popular, displayed on the keyboard
-        /* 58 */ "!hasLabels!,.net,.org,.gov,.edu",
-        /* 59 */ "1",
-        /* 60 */ "2",
-        /* 61 */ "3",
-        /* 62 */ "4",
-        /* 63 */ "5",
-        /* 64 */ "6",
-        /* 65 */ "7",
-        /* 66 */ "8",
-        /* 67 */ "9",
-        /* 68 */ "0",
-        /* 69~ */
+        /* 54 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB",
+        /* 55 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB",
+        /* 56 */ "1",
+        /* 57 */ "2",
+        /* 58 */ "3",
+        /* 59 */ "4",
+        /* 60 */ "5",
+        /* 61 */ "6",
+        /* 62 */ "7",
+        /* 63 */ "8",
+        /* 64 */ "9",
+        /* 65 */ "0",
+        /* 66~ */
         EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-        /* ~78 */
+        /* ~75 */
         // U+00B9: "¹" SUPERSCRIPT ONE
         // U+00BD: "½" VULGAR FRACTION ONE HALF
         // U+2153: "⅓" VULGAR FRACTION ONE THIRD
         // U+00BC: "¼" VULGAR FRACTION ONE QUARTER
         // U+215B: "⅛" VULGAR FRACTION ONE EIGHTH
-        /* 79 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B",
+        /* 76 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B",
         // U+00B2: "²" SUPERSCRIPT TWO
         // U+2154: "⅔" VULGAR FRACTION TWO THIRDS
-        /* 80 */ "\u00B2,\u2154",
+        /* 77 */ "\u00B2,\u2154",
         // U+00B3: "³" SUPERSCRIPT THREE
         // U+00BE: "¾" VULGAR FRACTION THREE QUARTERS
         // U+215C: "⅜" VULGAR FRACTION THREE EIGHTHS
-        /* 81 */ "\u00B3,\u00BE,\u215C",
+        /* 78 */ "\u00B3,\u00BE,\u215C",
         // U+2074: "⁴" SUPERSCRIPT FOUR
-        /* 82 */ "\u2074",
+        /* 79 */ "\u2074",
         // U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS
-        /* 83 */ "\u215D",
-        /* 84 */ EMPTY,
+        /* 80 */ "\u215D",
+        /* 81 */ EMPTY,
         // U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS
-        /* 85 */ "\u215E",
-        /* 86 */ EMPTY,
-        /* 87 */ EMPTY,
+        /* 82 */ "\u215E",
+        /* 83 */ EMPTY,
+        /* 84 */ EMPTY,
         // U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N
         // U+2205: "∅" EMPTY SET
-        /* 88 */ "\u207F,\u2205",
-        /* 89 */ ",",
-        /* 90 */ EMPTY,
-        /* 91 */ "?",
-        /* 92 */ ";",
-        /* 93 */ "%",
+        /* 85 */ "\u207F,\u2205",
+        /* 86 */ ",",
+        /* 87 */ EMPTY,
+        /* 88 */ "!",
+        /* 89 */ "?",
+        /* 90 */ ";",
+        /* 91 */ "%",
+        // U+00A1: "¡" INVERTED EXCLAMATION MARK
+        /* 92 */ "\u00A1",
         // U+00BF: "¿" INVERTED QUESTION MARK
-        /* 94 */ "\u00BF",
-        /* 95 */ EMPTY,
+        /* 93 */ "\u00BF",
+        /* 94 */ EMPTY,
         // U+2030: "‰" PER MILLE SIGN
-        /* 96 */ "\u2030",
-        /* 97 */ ",",
+        /* 95 */ "\u2030",
+        /* 96 */ ",",
+        /* 97 */ "!",
         /* 98 */ "!",
-        /* 99 */ "!",
+        /* 99 */ "?",
         /* 100 */ "?",
-        /* 101 */ "?",
-        /* 102 */ "\'",
-        /* 103 */ "-",
-        /* 104 */ "\"",
-        /* 105 */ "_",
-        /* 106 */ "\"",
-        /* 107 */ "_",
-        // U+266A: "♪" EIGHTH NOTE
-        // U+2665: "♥" BLACK HEART SUIT
-        // U+2660: "♠" BLACK SPADE SUIT
-        // U+2666: "♦" BLACK DIAMOND SUIT
-        // U+2663: "♣" BLACK CLUB SUIT
-        /* 108 */ "\u266A,\u2665,\u2660,\u2666,\u2663",
-        /* 109 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm",
-        /* 110 */ "!icon/settings_key|!code/key_settings",
-        /* 111 */ "!icon/shortcut_key|!code/key_shortcut",
-        /* 112 */ "!hasLabels!,!text/label_next_key|!code/key_action_next",
-        /* 113 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous",
+        /* 101 */ "\'",
+        /* 102 */ "\"",
+        /* 103 */ "\"",
+        /* 104 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm",
+        /* 105 */ "!icon/settings_key|!code/key_settings",
+        /* 106 */ "!icon/shortcut_key|!code/key_shortcut",
+        /* 107 */ "!hasLabels!,!text/label_next_key|!code/key_action_next",
+        /* 108 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous",
         // Label for "switch to more symbol" modifier key.  Must be short to fit on key!
-        /* 114 */ "= \\ <",
+        /* 109 */ "= \\ <",
         // Label for "switch to more symbol" modifier key on tablets.  Must be short to fit on key!
-        /* 115 */ "~ \\ {",
+        /* 110 */ "~ \\ {",
         // Label for "Tab" key.  Must be short to fit on key!
-        /* 116 */ "Tab",
+        /* 111 */ "Tab",
         // Label for "switch to phone numeric" key.  Must be short to fit on key!
-        /* 117 */ "123",
+        /* 112 */ "123",
         // Label for "switch to phone symbols" key.  Must be short to fit on key!
         // U+FF0A: "*" FULLWIDTH ASTERISK
         // U+FF03: "#" FULLWIDTH NUMBER SIGN
-        /* 118 */ "\uFF0A\uFF03",
+        /* 113 */ "\uFF0A\uFF03",
         // Key label for "ante meridiem"
-        /* 119 */ "AM",
+        /* 114 */ "AM",
         // Key label for "post meridiem"
-        /* 120 */ "PM",
+        /* 115 */ "PM",
         // Label for "switch to symbols" key on PC QWERTY layout
-        /* 121 */ "Sym",
+        /* 116 */ "Sym",
+        /* 117 */ ".com",
+        // popular web domains for the locale - most popular, displayed on the keyboard
+        /* 118 */ "!hasLabels!,.net,.org,.gov,.edu",
+        /* 119 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ",
+        // U+064F: "ُ" ARABIC DAMMA
+        // U+064C: "ٌ" ARABIC DAMMATAN
+        // U+0651: "ّ" ARABIC SHADDA
+        // U+0652: "ْ" ARABIC SUKUN
+        // U+0653: "ٓ" ARABIC MADDAH ABOVE
+        // U+064D: "ٍ" ARABIC KASRATAN
+        // U+064B: "ً" ARABIC FATHATAN
+        // U+0650: "ِ" ARABIC KASRA
+        // U+064E: "َ" ARABIC FATHA
+        // U+0640: "ـ" ARABIC TATWEEL
+        // U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
+        // U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
+        // U+0655: "ٕ" ARABIC HAMZA BELOW
+        // U+0654: "ٔ" ARABIC HAMZA ABOVE
+        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
+        /* 120 */ "!fixedColumnOrder!5,\u064F,\u064C,\u0651,\u0652,\u0653,\u064D,\u064B,\u0650,\u064E,\u0640\u0640\u0640|\u0640,\u0656,\u0670,\u0655,\u0654",
     };
 
     /* Language ar: Arabic */
@@ -400,38 +414,24 @@
         // <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!6,&#x201C;,&#x201D;,&#x201E;,&#x201F;,&#x00AB;|&#x00BB;,&#x00BB|&#x00AB;;,&#x2018;,&#x2019;,&#x201A;,&#x201B;</string>
         /* 43 */ "!fixedColumnOrder!4,\u201C,\u201D,\u00AB|\u00BB,\u00BB|\u00AB,\u2018,\u2019,\u201A,\u201B",
         /* 44~ */
-        null, null, null, null, null,
-        /* ~48 */
+        null, null, null, null,
+        /* ~47 */
         // U+061F: "؟" ARABIC QUESTION MARK
         // U+060C: "،" ARABIC COMMA
         // U+061B: "؛" ARABIC SEMICOLON
-        // U+0650: "ِ" ARABIC KASRA
-        // U+064E: "َ" ARABIC FATHA
-        // U+064D: "ٍ" ARABIC KASRATAN
-        // U+064B: "ً" ARABIC FATHATAN
-        // U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-        // U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-        // U+0655: "ٕ" ARABIC HAMZA BELOW
-        // U+0654: "ٔ" ARABIC HAMZA ABOVE
-        // U+064F: "ُ" ARABIC DAMMA
-        // U+064C: "ٌ" ARABIC DAMMATAN
-        // U+0651: "ّ" ARABIC SHADDA
-        // U+0652: "ْ" ARABIC SUKUN
-        // U+0653: "ٓ" ARABIC MADDAH ABOVE
-        // U+0640: "ـ" ARABIC TATWEEL
-        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
-        /* 49 */ "!fixedColumnOrder!8,\",\',-,:,!,\u061F,\u060C,\u061B,\u0650,\u064E,\u064D,\u064B,\u0656,\u0670,\u0655,\u0654,\u064F,\u064C,\u0651,\u0652,\u0653,\u0640\u0640\u0640|\u0640,/",
-        /* 50 */ "\u064B",
+        /* 48 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)",
         // U+2605: "★" BLACK STAR
         // U+066D: "٭" ARABIC FIVE POINTED STAR
-        /* 51 */ "\u2605,\u066D",
-        /* 52 */ null,
+        /* 49 */ "\u2605,\u066D",
+        // U+266A: "♪" EIGHTH NOTE
+        /* 50 */ "\u266A",
+        /* 51 */ null,
         // The all letters need to be mirrored are found at
         // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
         // U+FD3E: "﴾" ORNATE LEFT PARENTHESIS
         // U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS
-        /* 53 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
-        /* 54 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
+        /* 52 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
+        /* 53 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
         // U+2264: "≤" LESS-THAN OR EQUAL TO
         // U+2265: "≥" GREATER-THAN EQUAL TO
         // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
@@ -447,85 +447,65 @@
         // U+201D: "”" RIGHT DOUBLE QUOTATION MARK
         // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
         // U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK
-        /* 55 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
-        /* 56 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
-        /* 57 */ null,
-        /* 58 */ null,
+        /* 54 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
+        /* 55 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
         // U+0661: "١" ARABIC-INDIC DIGIT ONE
-        /* 59 */ "\u0661",
+        /* 56 */ "\u0661",
         // U+0662: "٢" ARABIC-INDIC DIGIT TWO
-        /* 60 */ "\u0662",
+        /* 57 */ "\u0662",
         // U+0663: "٣" ARABIC-INDIC DIGIT THREE
-        /* 61 */ "\u0663",
+        /* 58 */ "\u0663",
         // U+0664: "٤" ARABIC-INDIC DIGIT FOUR
-        /* 62 */ "\u0664",
+        /* 59 */ "\u0664",
         // U+0665: "٥" ARABIC-INDIC DIGIT FIVE
-        /* 63 */ "\u0665",
+        /* 60 */ "\u0665",
         // U+0666: "٦" ARABIC-INDIC DIGIT SIX
-        /* 64 */ "\u0666",
+        /* 61 */ "\u0666",
         // U+0667: "٧" ARABIC-INDIC DIGIT SEVEN
-        /* 65 */ "\u0667",
+        /* 62 */ "\u0667",
         // U+0668: "٨" ARABIC-INDIC DIGIT EIGHT
-        /* 66 */ "\u0668",
+        /* 63 */ "\u0668",
         // U+0669: "٩" ARABIC-INDIC DIGIT NINE
-        /* 67 */ "\u0669",
+        /* 64 */ "\u0669",
         // U+0660: "٠" ARABIC-INDIC DIGIT ZERO
-        /* 68 */ "\u0660",
-        /* 69 */ "1",
-        /* 70 */ "2",
-        /* 71 */ "3",
-        /* 72 */ "4",
-        /* 73 */ "5",
-        /* 74 */ "6",
-        /* 75 */ "7",
-        /* 76 */ "8",
-        /* 77 */ "9",
+        /* 65 */ "\u0660",
+        /* 66 */ "1",
+        /* 67 */ "2",
+        /* 68 */ "3",
+        /* 69 */ "4",
+        /* 70 */ "5",
+        /* 71 */ "6",
+        /* 72 */ "7",
+        /* 73 */ "8",
+        /* 74 */ "9",
         // U+066B: "٫" ARABIC DECIMAL SEPARATOR
         // U+066C: "٬" ARABIC THOUSANDS SEPARATOR
-        /* 78 */ "0,\u066B,\u066C",
-        /* 79~ */
+        /* 75 */ "0,\u066B,\u066C",
+        /* 76~ */
         null, null, null, null, null, null, null, null, null, null,
-        /* ~88 */
+        /* ~85 */
         // U+060C: "،" ARABIC COMMA
-        /* 89 */ "\u060C",
-        /* 90 */ "\\,",
-        /* 91 */ "\u061F",
-        /* 92 */ "\u061B",
+        /* 86 */ "\u060C",
+        /* 87 */ "\\,",
+        /* 88 */ null,
+        /* 89 */ "\u061F",
+        /* 90 */ "\u061B",
         // U+066A: "٪" ARABIC PERCENT SIGN
-        /* 93 */ "\u066A",
-        /* 94 */ "?",
-        /* 95 */ ";",
+        /* 91 */ "\u066A",
+        /* 92 */ null,
+        /* 93 */ "?",
+        /* 94 */ ";",
         // U+2030: "‰" PER MILLE SIGN
-        /* 96 */ "\\%,\u2030",
-        /* 97~ */
+        /* 95 */ "\\%,\u2030",
+        /* 96~ */
         null, null, null, null, null,
-        /* ~101 */
+        /* ~100 */
         // U+060C: "،" ARABIC COMMA
         // U+061B: "؛" ARABIC SEMICOLON
         // U+061F: "؟" ARABIC QUESTION MARK
-        /* 102 */ "\u060C",
-        /* 103 */ ".",
-        /* 104 */ "\u061F",
-        /* 105 */ "\u064B",
-        /* 106 */ "\u061F,\u061B,!,:,-,/,\',\"",
-        // U+0651: "ّ" ARABIC SHADDA
-        // U+0652: "ْ" ARABIC SUKUN
-        // U+064C: "ٌ" ARABIC DAMMATAN
-        // U+0653: "ٓ" ARABIC MADDAH ABOVE
-        // U+064F: "ُ" ARABIC DAMMA
-        // U+0650: "ِ" ARABIC KASRA
-        // U+064E: "َ" ARABIC FATHA
-        // U+064B: "ً" ARABIC FATHATAN
-        // U+0640: "ـ" ARABIC TATWEEL
-        // U+064D: "ٍ" ARABIC KASRATAN
-        // U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-        // U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-        // U+0654: "ٔ" ARABIC HAMZA ABOVE
-        // U+0655: "ٕ" ARABIC HAMZA BELOW
-        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
-        /* 107 */ "\u0651,\u0652,\u064C,\u0653,\u064F,\u0650,\u064E,\u064B,\u0640\u0640\u0640|\u0640,\u064D,\u0654,\u0656,\u0655,\u0670",
-        // U+266A: "♪" EIGHTH NOTE
-        /* 108 */ "\u266A",
+        /* 101 */ "\u060C",
+        /* 102 */ "\u061F",
+        /* 103 */ "\u061F,\u061B,!,:,-,/,\',\"",
     };
 
     /* Language be: Belarusian */
@@ -881,11 +861,31 @@
         /* 8~ */
         null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
         null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
-        null, null, null, null, null, null, null, null, null, null, null,
-        /* ~48 */
+        null, null, null, null, null, null, null, null, null, null,
+        /* ~47 */
         // U+00A1: "¡" INVERTED EXCLAMATION MARK
         // U+00BF: "¿" INVERTED QUESTION MARK
-        /* 49 */ "!fixedColumnOrder!7,#,-,\u00A1,!,\u00BF,\\,,?,\\%,+,;,:,/,(,),@,&,\",\'",
+        /* 48 */ "!fixedColumnOrder!9,\",\',#,-,\u00A1,!,\u00BF,\\,,?,@,&,\\%,+,;,:,/,(,)",
+        /* 49~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null,
+        /* ~87 */
+        // U+00A1: "¡" INVERTED EXCLAMATION MARK
+        /* 88 */ "\u00A1",
+        // U+00BF: "¿" INVERTED QUESTION MARK
+        /* 89 */ "\u00BF",
+        /* 90 */ null,
+        /* 91 */ null,
+        /* 92 */ "!",
+        /* 93 */ "?",
+        /* 94~ */
+        null, null, null,
+        /* ~96 */
+        /* 97 */ "\u00A1",
+        /* 98 */ "\u00A1,!",
+        /* 99 */ "\u00BF",
+        /* 100 */ "\u00BF,?",
     };
 
     /* Language et: Estonian */
@@ -1002,38 +1002,24 @@
         // <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!6,&#x201C;,&#x201D;,&#x201E;,&#x201F;,&#x00AB;|&#x00BB;,&#x00BB|&#x00AB;;,&#x2018;,&#x2019;,&#x201A;,&#x201B;</string>
         /* 43 */ "!fixedColumnOrder!4,\u201C,\u201D,\u00AB|\u00BB,\u00BB|\u00AB,\u2018,\u2019,\u201A,\u201B",
         /* 44~ */
-        null, null, null, null, null,
-        /* ~48 */
+        null, null, null, null,
+        /* ~47 */
         // U+061F: "؟" ARABIC QUESTION MARK
         // U+060C: "،" ARABIC COMMA
         // U+061B: "؛" ARABIC SEMICOLON
-        // U+0650: "ِ" ARABIC KASRA
-        // U+064E: "َ" ARABIC FATHA
-        // U+064D: "ٍ" ARABIC KASRATAN
-        // U+064B: "ً" ARABIC FATHATAN
-        // U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-        // U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-        // U+0655: "ٕ" ARABIC HAMZA BELOW
-        // U+0654: "ٔ" ARABIC HAMZA ABOVE
-        // U+064F: "ُ" ARABIC DAMMA
-        // U+064C: "ٌ" ARABIC DAMMATAN
-        // U+0651: "ّ" ARABIC SHADDA
-        // U+0652: "ْ" ARABIC SUKUN
-        // U+0653: "ٓ" ARABIC MADDAH ABOVE
-        // U+0640: "ـ" ARABIC TATWEEL
-        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
-        /* 49 */ "!fixedColumnOrder!8,\",\',-,:,!,\u061F,\u060C,\u061B,\u0650,\u064E,\u064D,\u064B,\u0656,\u0670,\u0655,\u0654,\u064F,\u064C,\u0651,\u0652,\u0653,\u0640\u0640\u0640|\u0640,/",
-        /* 50 */ "\u064B",
+        /* 48 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(,)",
         // U+2605: "★" BLACK STAR
         // U+066D: "٭" ARABIC FIVE POINTED STAR
-        /* 51 */ "\u2605,\u066D",
-        /* 52 */ null,
+        /* 49 */ "\u2605,\u066D",
+        // U+266A: "♪" EIGHTH NOTE
+        /* 50 */ "\u266A",
+        /* 51 */ null,
         // The all letters need to be mirrored are found at
         // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
         // U+FD3E: "﴾" ORNATE LEFT PARENTHESIS
         // U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS
-        /* 53 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
-        /* 54 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
+        /* 52 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
+        /* 53 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
         // U+2264: "≤" LESS-THAN OR EQUAL TO
         // U+2265: "≥" GREATER-THAN EQUAL TO
         // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
@@ -1049,87 +1035,67 @@
         // U+201D: "”" RIGHT DOUBLE QUOTATION MARK
         // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
         // U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK
-        /* 55 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
-        /* 56 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
-        /* 57 */ null,
-        /* 58 */ null,
+        /* 54 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
+        /* 55 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
         // U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE
-        /* 59 */ "\u06F1",
+        /* 56 */ "\u06F1",
         // U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO
-        /* 60 */ "\u06F2",
+        /* 57 */ "\u06F2",
         // U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE
-        /* 61 */ "\u06F3",
+        /* 58 */ "\u06F3",
         // U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR
-        /* 62 */ "\u06F4",
+        /* 59 */ "\u06F4",
         // U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE
-        /* 63 */ "\u06F5",
+        /* 60 */ "\u06F5",
         // U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX
-        /* 64 */ "\u06F6",
+        /* 61 */ "\u06F6",
         // U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN
-        /* 65 */ "\u06F7",
+        /* 62 */ "\u06F7",
         // U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT
-        /* 66 */ "\u06F8",
+        /* 63 */ "\u06F8",
         // U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE
-        /* 67 */ "\u06F9",
+        /* 64 */ "\u06F9",
         // U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO
-        /* 68 */ "\u06F0",
-        /* 69 */ "1",
-        /* 70 */ "2",
-        /* 71 */ "3",
-        /* 72 */ "4",
-        /* 73 */ "5",
-        /* 74 */ "6",
-        /* 75 */ "7",
-        /* 76 */ "8",
-        /* 77 */ "9",
+        /* 65 */ "\u06F0",
+        /* 66 */ "1",
+        /* 67 */ "2",
+        /* 68 */ "3",
+        /* 69 */ "4",
+        /* 70 */ "5",
+        /* 71 */ "6",
+        /* 72 */ "7",
+        /* 73 */ "8",
+        /* 74 */ "9",
         // U+066B: "٫" ARABIC DECIMAL SEPARATOR
         // U+066C: "٬" ARABIC THOUSANDS SEPARATOR
-        /* 78 */ "0,\u066B,\u066C",
-        /* 79~ */
+        /* 75 */ "0,\u066B,\u066C",
+        /* 76~ */
         null, null, null, null, null, null, null, null, null, null,
-        /* ~88 */
+        /* ~85 */
         // U+060C: "،" ARABIC COMMA
-        /* 89 */ "\u060C",
-        /* 90 */ "\\,",
-        /* 91 */ "\u061F",
-        /* 92 */ "\u061B",
+        /* 86 */ "\u060C",
+        /* 87 */ "\\,",
+        /* 88 */ null,
+        /* 89 */ "\u061F",
+        /* 90 */ "\u061B",
         // U+066A: "٪" ARABIC PERCENT SIGN
-        /* 93 */ "\u066A",
-        /* 94 */ "?",
-        /* 95 */ ";",
+        /* 91 */ "\u066A",
+        /* 92 */ null,
+        /* 93 */ "?",
+        /* 94 */ ";",
         // U+2030: "‰" PER MILLE SIGN
-        /* 96 */ "\\%,\u2030",
+        /* 95 */ "\\%,\u2030",
         // U+060C: "،" ARABIC COMMA
         // U+061B: "؛" ARABIC SEMICOLON
         // U+061F: "؟" ARABIC QUESTION MARK
-        /* 97 */ "\u060C",
-        /* 98 */ "!",
-        /* 99 */ "!,\\,",
-        /* 100 */ "\u061F",
-        /* 101 */ "\u061F,?",
-        /* 102~ */
-        null, null, null,
-        /* ~104 */
-        /* 105 */ "\u064B",
-        /* 106 */ "\u061F,\u061B,!,:,-,/,\',\"",
-        // U+0651: "ّ" ARABIC SHADDA
-        // U+0652: "ْ" ARABIC SUKUN
-        // U+064C: "ٌ" ARABIC DAMMATAN
-        // U+0653: "ٓ" ARABIC MADDAH ABOVE
-        // U+064F: "ُ" ARABIC DAMMA
-        // U+0650: "ِ" ARABIC KASRA
-        // U+064E: "َ" ARABIC FATHA
-        // U+064B: "ً" ARABIC FATHATAN
-        // U+0640: "ـ" ARABIC TATWEEL
-        // U+064D: "ٍ" ARABIC KASRATAN
-        // U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-        // U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-        // U+0654: "ٔ" ARABIC HAMZA ABOVE
-        // U+0655: "ٕ" ARABIC HAMZA BELOW
-        // In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
-        /* 107 */ "\u0651,\u0652,\u064C,\u0653,\u064F,\u0650,\u064E,\u064B,\u0640\u0640\u0640|\u0640,\u064D,\u0654,\u0656,\u0655,_,\u0670",
-        // U+266A: "♪" EIGHTH NOTE
-        /* 108 */ "\u266A",
+        /* 96 */ "\u060C",
+        /* 97 */ "!",
+        /* 98 */ "!,\\,",
+        /* 99 */ "\u061F",
+        /* 100 */ "\u061F,?",
+        /* 101 */ null,
+        /* 102 */ null,
+        /* 103 */ "\u061F,\u061B,!,:,-,/,\',\"",
     };
 
     /* Language fi: Finnish */
@@ -1238,38 +1204,38 @@
         null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
         null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
         null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
-        null, null, null, null, null, null, null, null, null, null, null, null, null, null,
-        /* ~58 */
+        null, null, null, null, null, null, null, null, null, null, null,
+        /* ~55 */
         // U+0967: "१" DEVANAGARI DIGIT ONE
-        /* 59 */ "\u0967",
+        /* 56 */ "\u0967",
         // U+0968: "२" DEVANAGARI DIGIT TWO
-        /* 60 */ "\u0968",
+        /* 57 */ "\u0968",
         // U+0969: "३" DEVANAGARI DIGIT THREE
-        /* 61 */ "\u0969",
+        /* 58 */ "\u0969",
         // U+096A: "४" DEVANAGARI DIGIT FOUR
-        /* 62 */ "\u096A",
+        /* 59 */ "\u096A",
         // U+096B: "५" DEVANAGARI DIGIT FIVE
-        /* 63 */ "\u096B",
+        /* 60 */ "\u096B",
         // U+096C: "६" DEVANAGARI DIGIT SIX
-        /* 64 */ "\u096C",
+        /* 61 */ "\u096C",
         // U+096D: "७" DEVANAGARI DIGIT SEVEN
-        /* 65 */ "\u096D",
+        /* 62 */ "\u096D",
         // U+096E: "८" DEVANAGARI DIGIT EIGHT
-        /* 66 */ "\u096E",
+        /* 63 */ "\u096E",
         // U+096F: "९" DEVANAGARI DIGIT NINE
-        /* 67 */ "\u096F",
+        /* 64 */ "\u096F",
         // U+0966: "०" DEVANAGARI DIGIT ZERO
-        /* 68 */ "\u0966",
-        /* 69 */ "1",
-        /* 70 */ "2",
-        /* 71 */ "3",
-        /* 72 */ "4",
-        /* 73 */ "5",
-        /* 74 */ "6",
-        /* 75 */ "7",
-        /* 76 */ "8",
-        /* 77 */ "9",
-        /* 78 */ "0",
+        /* 65 */ "\u0966",
+        /* 66 */ "1",
+        /* 67 */ "2",
+        /* 68 */ "3",
+        /* 69 */ "4",
+        /* 70 */ "5",
+        /* 71 */ "6",
+        /* 72 */ "7",
+        /* 73 */ "8",
+        /* 74 */ "9",
+        /* 75 */ "0",
     };
 
     /* Language hr: Croatian */
@@ -1466,17 +1432,18 @@
         // <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!6,&#x201C;,&#x201D;,&#x201E;,&#x201F;,&#x00AB;|&#x00BB;,&#x00BB|&#x00AB;;,&#x2018;,&#x2019;,&#x201A;,&#x201B;</string>
         /* 43 */ "!fixedColumnOrder!4,\u201C,\u201D,\u00AB|\u00BB,\u00BB|\u00AB,\u2018,\u2019,\u201A,\u201B",
         /* 44~ */
-        null, null, null, null, null, null, null,
-        /* ~50 */
+        null, null, null, null, null,
+        /* ~48 */
         // U+2605: "★" BLACK STAR
-        /* 51 */ "\u2605",
+        /* 49 */ "\u2605",
+        /* 50 */ null,
         // U+00B1: "±" PLUS-MINUS SIGN
         // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN
-        /* 52 */ "\u00B1,\uFB29",
+        /* 51 */ "\u00B1,\uFB29",
         // The all letters need to be mirrored are found at
         // http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
-        /* 53 */ "!fixedColumnOrder!3,<|>,{|},[|]",
-        /* 54 */ "!fixedColumnOrder!3,>|<,}|{,]|[",
+        /* 52 */ "!fixedColumnOrder!3,<|>,{|},[|]",
+        /* 53 */ "!fixedColumnOrder!3,>|<,}|{,]|[",
         // U+2264: "≤" LESS-THAN OR EQUAL TO
         // U+2265: "≥" GREATER-THAN EQUAL TO
         // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
@@ -1492,8 +1459,8 @@
         // U+201D: "”" RIGHT DOUBLE QUOTATION MARK
         // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
         // U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK
-        /* 55 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
-        /* 56 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
+        /* 54 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
+        /* 55 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
     };
 
     /* Language ky: Kirghiz */
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 213c0ac..011b512 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -635,6 +635,12 @@
             Log.d(TAG, "onStartInputView: editorInfo:"
                     + String.format("inputType=0x%08x imeOptions=0x%08x",
                             editorInfo.inputType, editorInfo.imeOptions));
+            Log.d(TAG, "All caps = "
+                    + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS) != 0)
+                    + ", sentence caps = "
+                    + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_SENTENCES) != 0)
+                    + ", word caps = "
+                    + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0));
         }
         if (ProductionFlag.IS_EXPERIMENTAL) {
             ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, mPrefs);
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index f416452..6f7f0c3 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -23,6 +23,7 @@
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.LruCache;
+import android.view.textservice.SentenceSuggestionsInfo;
 import android.view.textservice.SuggestionsInfo;
 import android.view.textservice.TextInfo;
 
@@ -392,7 +393,10 @@
     public DictAndProximity createDictAndProximity(final Locale locale) {
         final int script = getScriptFromLocale(locale);
         final ProximityInfo proximityInfo = ProximityInfo.createSpellCheckerProximityInfo(
-                SpellCheckerProximityInfo.getProximityForScript(script));
+                SpellCheckerProximityInfo.getProximityForScript(script),
+                SpellCheckerProximityInfo.ROW_SIZE,
+                SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH,
+                SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT);
         final DictionaryCollection dictionaryCollection =
                 DictionaryFactory.createDictionaryFromManager(this, locale,
                         true /* useFullEditDistance */);
@@ -484,6 +488,10 @@
                 }
                 mUnigramSuggestionsInfoCache.put(query, new SuggestionsParams(suggestions, flags));
             }
+
+            public void remove(String key) {
+                mUnigramSuggestionsInfoCache.remove(key);
+            }
         }
 
         AndroidSpellCheckerSession(final AndroidSpellCheckerService service) {
@@ -566,6 +574,96 @@
             return (letterCount * 4 < length * 3);
         }
 
+        private SentenceSuggestionsInfo fixWronglyInvalidatedWordWithSingleQuote(
+                TextInfo ti, SentenceSuggestionsInfo ssi) {
+            final String typedText = ti.getText();
+            if (!typedText.contains(SINGLE_QUOTE)) {
+                return null;
+            }
+            final int N = ssi.getSuggestionsCount();
+            final ArrayList<Integer> additionalOffsets = new ArrayList<Integer>();
+            final ArrayList<Integer> additionalLengths = new ArrayList<Integer>();
+            final ArrayList<SuggestionsInfo> additionalSuggestionsInfos =
+                    new ArrayList<SuggestionsInfo>();
+            for (int i = 0; i < N; ++i) {
+                final SuggestionsInfo si = ssi.getSuggestionsInfoAt(i);
+                final int flags = si.getSuggestionsAttributes();
+                if ((flags & SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY) == 0) {
+                    continue;
+                }
+                final int offset = ssi.getOffsetAt(i);
+                final int length = ssi.getLengthAt(i);
+                final String subText = typedText.substring(offset, offset + length);
+                if (!subText.contains(SINGLE_QUOTE)) {
+                    continue;
+                }
+                final String[] splitTexts = subText.split(SINGLE_QUOTE, -1);
+                if (splitTexts == null || splitTexts.length <= 1) {
+                    continue;
+                }
+                final int splitNum = splitTexts.length;
+                for (int j = 0; j < splitNum; ++j) {
+                    final String splitText = splitTexts[j];
+                    if (TextUtils.isEmpty(splitText)) {
+                        continue;
+                    }
+                    if (mSuggestionsCache.getSuggestionsFromCache(splitText) == null) {
+                        continue;
+                    }
+                    final int newLength = splitText.length();
+                    // Neither RESULT_ATTR_IN_THE_DICTIONARY nor RESULT_ATTR_LOOKS_LIKE_TYPO
+                    final int newFlags = 0;
+                    final SuggestionsInfo newSi = new SuggestionsInfo(newFlags, EMPTY_STRING_ARRAY);
+                    newSi.setCookieAndSequence(si.getCookie(), si.getSequence());
+                    if (DBG) {
+                        Log.d(TAG, "Override and remove old span over: "
+                                + splitText + ", " + offset + "," + newLength);
+                    }
+                    additionalOffsets.add(offset);
+                    additionalLengths.add(newLength);
+                    additionalSuggestionsInfos.add(newSi);
+                }
+            }
+            final int additionalSize = additionalOffsets.size();
+            if (additionalSize <= 0) {
+                return null;
+            }
+            final int suggestionsSize = N + additionalSize;
+            final int[] newOffsets = new int[suggestionsSize];
+            final int[] newLengths = new int[suggestionsSize];
+            final SuggestionsInfo[] newSuggestionsInfos = new SuggestionsInfo[suggestionsSize];
+            int i;
+            for (i = 0; i < N; ++i) {
+                newOffsets[i] = ssi.getOffsetAt(i);
+                newLengths[i] = ssi.getLengthAt(i);
+                newSuggestionsInfos[i] = ssi.getSuggestionsInfoAt(i);
+            }
+            for (; i < suggestionsSize; ++i) {
+                newOffsets[i] = additionalOffsets.get(i - N);
+                newLengths[i] = additionalLengths.get(i - N);
+                newSuggestionsInfos[i] = additionalSuggestionsInfos.get(i - N);
+            }
+            return new SentenceSuggestionsInfo(newSuggestionsInfos, newOffsets, newLengths);
+        }
+
+        @Override
+        public SentenceSuggestionsInfo[] onGetSentenceSuggestionsMultiple(
+                TextInfo[] textInfos, int suggestionsLimit) {
+            final SentenceSuggestionsInfo[] retval = super.onGetSentenceSuggestionsMultiple(
+                    textInfos, suggestionsLimit);
+            if (retval == null || retval.length != textInfos.length) {
+                return retval;
+            }
+            for (int i = 0; i < retval.length; ++i) {
+                final SentenceSuggestionsInfo tempSsi =
+                        fixWronglyInvalidatedWordWithSingleQuote(textInfos[i], retval[i]);
+                if (tempSsi != null) {
+                    retval[i] = tempSsi;
+                }
+            }
+            return retval;
+        }
+
         // Note : this must be reentrant
         /**
          * Gets a list of suggestions for a specific string. This returns a list of possible
diff --git a/tools/maketext/res/values-ar/donottranslate-more-keys.xml b/tools/maketext/res/values-ar/donottranslate-more-keys.xml
index b6b7294..9368321 100644
--- a/tools/maketext/res/values-ar/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values-ar/donottranslate-more-keys.xml
@@ -18,26 +18,6 @@
 */
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- U+061F: "؟" ARABIC QUESTION MARK
-         U+060C: "،" ARABIC COMMA
-         U+061B: "؛" ARABIC SEMICOLON -->
-    <!-- U+0650: "ِ" ARABIC KASRA
-         U+064E: "َ" ARABIC FATHA
-         U+064D: "ٍ" ARABIC KASRATAN
-         U+064B: "ً" ARABIC FATHATAN
-         U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-         U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-         U+0655: "ٕ" ARABIC HAMZA BELOW
-         U+0654: "ٔ" ARABIC HAMZA ABOVE -->
-    <!-- U+064F: "ُ" ARABIC DAMMA
-         U+064C: "ٌ" ARABIC DAMMATAN
-         U+0651: "ّ" ARABIC SHADDA
-         U+0652: "ْ" ARABIC SUKUN
-         U+0653: "ٓ" ARABIC MADDAH ABOVE
-         U+0640: "ـ" ARABIC TATWEEL -->
-    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
-    <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',-,:,!,&#x061F;,&#x060C;,&#x061B;,&#x0650;,&#x064E;,&#x064D;,&#x064B;,&#x0656;,&#x0670;,&#x0655;,&#x0654;,&#x064F;,&#x064C;,&#x0651;,&#x0652;,&#x0653;,&#x0640;&#x0640;&#x0640;|&#x0640;,/"</string>
-    <string name="keyhintlabel_for_punctuation">&#x064B;</string>
     <!-- U+0661: "١" ARABIC-INDIC DIGIT ONE -->
     <string name="keylabel_for_symbols_1">&#x0661;</string>
     <!-- U+0662: "٢" ARABIC-INDIC DIGIT TWO -->
@@ -85,26 +65,12 @@
          U+061B: "؛" ARABIC SEMICOLON
          U+061F: "؟" ARABIC QUESTION MARK -->
     <string name="keylabel_for_apostrophe">&#x060C;</string>
-    <string name="keylabel_for_dash">"."</string>
     <string name="keyhintlabel_for_apostrophe">&#x061F;</string>
-    <string name="keyhintlabel_for_dash">&#x064B;</string>
+    <!-- U+061F: "؟" ARABIC QUESTION MARK
+         U+060C: "،" ARABIC COMMA
+         U+061B: "؛" ARABIC SEMICOLON -->
+    <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',#,-,:,!,&#x060C;,&#x061F;,\@,&amp;,\\%,+,&#x061B;,/,(,)"</string>
     <string name="more_keys_for_apostrophe">"&#x061F;,&#x061B;,!,:,-,/,\',\""</string>
-    <!-- U+0651: "ّ" ARABIC SHADDA
-         U+0652: "ْ" ARABIC SUKUN
-         U+064C: "ٌ" ARABIC DAMMATAN
-         U+0653: "ٓ" ARABIC MADDAH ABOVE
-         U+064F: "ُ" ARABIC DAMMA -->
-    <!-- U+0650: "ِ" ARABIC KASRA
-         U+064E: "َ" ARABIC FATHA
-         U+064B: "ً" ARABIC FATHATAN
-         U+0640: "ـ" ARABIC TATWEEL
-         U+064D: "ٍ" ARABIC KASRATAN -->
-    <!-- U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-         U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-         U+0654: "ٔ" ARABIC HAMZA ABOVE
-         U+0655: "ٕ" ARABIC HAMZA BELOW -->
-    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
-    <string name="more_keys_for_dash">"&#x0651;,&#x0652;,&#x064C;,&#x0653;,&#x064F;,&#x0650;,&#x064E;,&#x064B;,&#x0640;&#x0640;&#x0640;|&#x0640;,&#x064D;,&#x0654;,&#x0656;,&#x0655;,&#x0670;"</string>
     <!-- U+266A: "♪" EIGHTH NOTE -->
     <string name="more_keys_for_bullet">&#x266A;</string>
     <!-- U+2605: "★" BLACK STAR
diff --git a/tools/maketext/res/values-es/donottranslate-more-keys.xml b/tools/maketext/res/values-es/donottranslate-more-keys.xml
index f56b1d5..2077af4 100644
--- a/tools/maketext/res/values-es/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values-es/donottranslate-more-keys.xml
@@ -69,5 +69,15 @@
     <string name="more_keys_for_c">&#x00E7;,&#x0107;,&#x010D;</string>
     <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK
          U+00BF: "¿" INVERTED QUESTION MARK -->
-    <string name="more_keys_for_punctuation">"!fixedColumnOrder!7,#,-,&#x00A1;,!,&#x00BF;,\\,,\?,\\%,+,;,:,/,(,),\@,&amp;,\",\'"</string>
+    <string name="more_keys_for_punctuation">"!fixedColumnOrder!9,\",\',#,-,&#x00A1;,!,&#x00BF;,\\,,\?,\@,&amp;,\\%,+,;,:,/,(,)"</string>
+    <string name="keyhintlabel_for_tablet_comma">&#x00A1;</string>
+    <string name="more_keys_for_tablet_comma">"&#x00A1;,!"</string>
+    <string name="keyhintlabel_for_tablet_period">&#x00BF;</string>
+    <string name="more_keys_for_tablet_period">"&#x00BF;,\?"</string>
+    <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK -->
+    <string name="keylabel_for_symbols_exclamation">"&#x00A1;"</string>
+    <!-- U+00BF: "¿" INVERTED QUESTION MARK -->
+    <string name="keylabel_for_symbols_question">"&#x00BF;"</string>
+    <string name="more_keys_for_symbols_exclamation">"!"</string>
+    <string name="more_keys_for_symbols_question">"\?"</string>
 </resources>
diff --git a/tools/maketext/res/values-fa/donottranslate-more-keys.xml b/tools/maketext/res/values-fa/donottranslate-more-keys.xml
index 300017f..56b8911 100644
--- a/tools/maketext/res/values-fa/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values-fa/donottranslate-more-keys.xml
@@ -18,26 +18,6 @@
 */
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- U+061F: "؟" ARABIC QUESTION MARK
-         U+060C: "،" ARABIC COMMA
-         U+061B: "؛" ARABIC SEMICOLON -->
-    <!-- U+0650: "ِ" ARABIC KASRA
-         U+064E: "َ" ARABIC FATHA
-         U+064D: "ٍ" ARABIC KASRATAN
-         U+064B: "ً" ARABIC FATHATAN
-         U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-         U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-         U+0655: "ٕ" ARABIC HAMZA BELOW
-         U+0654: "ٔ" ARABIC HAMZA ABOVE -->
-    <!-- U+064F: "ُ" ARABIC DAMMA
-         U+064C: "ٌ" ARABIC DAMMATAN
-         U+0651: "ّ" ARABIC SHADDA
-         U+0652: "ْ" ARABIC SUKUN
-         U+0653: "ٓ" ARABIC MADDAH ABOVE
-         U+0640: "ـ" ARABIC TATWEEL -->
-    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
-    <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',-,:,!,&#x061F;,&#x060C;,&#x061B;,&#x0650;,&#x064E;,&#x064D;,&#x064B;,&#x0656;,&#x0670;,&#x0655;,&#x0654;,&#x064F;,&#x064C;,&#x0651;,&#x0652;,&#x0653;,&#x0640;&#x0640;&#x0640;|&#x0640;,/"</string>
-    <string name="keyhintlabel_for_punctuation">&#x064B;</string>
     <!-- U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE -->
     <string name="keylabel_for_symbols_1">&#x06F1;</string>
     <!-- U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO -->
@@ -89,24 +69,11 @@
     <string name="more_keys_for_tablet_comma">"!,\\,"</string>
     <string name="keyhintlabel_for_tablet_period">"&#x061F;"</string>
     <string name="more_keys_for_tablet_period">"&#x061F;,\?"</string>
-    <string name="keyhintlabel_for_dash">&#x064B;</string>
     <string name="more_keys_for_apostrophe">"&#x061F;,&#x061B;,!,:,-,/,\',\""</string>
-    <!-- U+0651: "ّ" ARABIC SHADDA
-         U+0652: "ْ" ARABIC SUKUN
-         U+064C: "ٌ" ARABIC DAMMATAN
-         U+0653: "ٓ" ARABIC MADDAH ABOVE
-         U+064F: "ُ" ARABIC DAMMA -->
-    <!-- U+0650: "ِ" ARABIC KASRA
-         U+064E: "َ" ARABIC FATHA
-         U+064B: "ً" ARABIC FATHATAN
-         U+0640: "ـ" ARABIC TATWEEL
-         U+064D: "ٍ" ARABIC KASRATAN -->
-    <!-- U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
-         U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
-         U+0654: "ٔ" ARABIC HAMZA ABOVE
-         U+0655: "ٕ" ARABIC HAMZA BELOW -->
-    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
-    <string name="more_keys_for_dash">"&#x0651;,&#x0652;,&#x064C;,&#x0653;,&#x064F;,&#x0650;,&#x064E;,&#x064B;,&#x0640;&#x0640;&#x0640;|&#x0640;,&#x064D;,&#x0654;,&#x0656;,&#x0655;,_,&#x0670;"</string>
+    <!-- U+061F: "؟" ARABIC QUESTION MARK
+         U+060C: "،" ARABIC COMMA
+         U+061B: "؛" ARABIC SEMICOLON -->
+    <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',#,-,:,!,&#x060C;,&#x061F;,\@,&amp;,\\%,+,&#x061B;,/,(,)"</string>
     <!-- U+266A: "♪" EIGHTH NOTE -->
     <string name="more_keys_for_bullet">&#x266A;</string>
     <!-- U+2605: "★" BLACK STAR
diff --git a/tools/maketext/res/values/donottranslate-more-keys.xml b/tools/maketext/res/values/donottranslate-more-keys.xml
index 1acb8a1..16eaa61 100644
--- a/tools/maketext/res/values/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values/donottranslate-more-keys.xml
@@ -75,13 +75,17 @@
     <string name="more_keys_for_currency_euro">&#x00A2;,&#x00A3;,$,&#x00A5;,&#x20B1;</string>
     <string name="more_keys_for_currency_pound">&#x00A2;,$,&#x20AC;,&#x00A5;,&#x20B1;</string>
     <string name="more_keys_for_currency_general">&#x00A2;,$,&#x20AC;,&#x00A3;,&#x00A5;,&#x20B1;</string>
-    <string name="more_keys_for_smiley">"!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ "</string>
     <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',#,-,:,!,\\,,\?,\@,&amp;,\\%,+,;,/,(,)"</string>
-    <string name="keyhintlabel_for_punctuation"></string>
     <!-- U+2020: "†" DAGGER
          U+2021: "‡" DOUBLE DAGGER
          U+2605: "★" BLACK STAR -->
     <string name="more_keys_for_star">&#x2020;,&#x2021;,&#x2605;</string>
+    <!-- U+266A: "♪" EIGHTH NOTE
+         U+2665: "♥" BLACK HEART SUIT
+         U+2660: "♠" BLACK SPADE SUIT
+         U+2666: "♦" BLACK DIAMOND SUIT
+         U+2663: "♣" BLACK CLUB SUIT -->
+    <string name="more_keys_for_bullet">&#x266A;,&#x2665;,&#x2660;,&#x2666;,&#x2663;</string>
     <!-- U+00B1: "±" PLUS-MINUS SIGN -->
     <string name="more_keys_for_plus">&#x00B1;</string>
     <!-- The all letters need to be mirrored are found at
@@ -105,9 +109,6 @@
          U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
     <string name="more_keys_for_less_than">!fixedColumnOrder!3,&#x2039;,&#x2264;,&#x00AB;</string>
     <string name="more_keys_for_greater_than">!fixedColumnOrder!3,&#x203A;,&#x2265;,&#x00BB;</string>
-    <string name="keylabel_for_popular_domain">".com"</string>
-    <!-- popular web domains for the locale - most popular, displayed on the keyboard -->
-    <string name="more_keys_for_popular_domain">"!hasLabels!,.net,.org,.gov,.edu"</string>
     <string name="keylabel_for_symbols_1">1</string>
     <string name="keylabel_for_symbols_2">2</string>
     <string name="keylabel_for_symbols_3">3</string>
@@ -155,9 +156,12 @@
     <string name="more_keys_for_symbols_0">&#x207F;,&#x2205;</string>
     <string name="keylabel_for_comma">,</string>
     <string name="more_keys_for_comma"></string>
+    <string name="keylabel_for_symbols_exclamation">!</string>
     <string name="keylabel_for_symbols_question">\?</string>
     <string name="keylabel_for_symbols_semicolon">;</string>
     <string name="keylabel_for_symbols_percent">%</string>
+    <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK -->
+    <string name="more_keys_for_symbols_exclamation">&#x00A1;</string>
     <!-- U+00BF: "¿" INVERTED QUESTION MARK -->
     <string name="more_keys_for_symbols_question">&#x00BF;</string>
     <string name="more_keys_for_symbols_semicolon"></string>
@@ -169,17 +173,8 @@
     <string name="keyhintlabel_for_tablet_period">\?</string>
     <string name="more_keys_for_tablet_period">\?</string>
     <string name="keylabel_for_apostrophe">\'</string>
-    <string name="keylabel_for_dash">-</string>
     <string name="keyhintlabel_for_apostrophe">\"</string>
-    <string name="keyhintlabel_for_dash">_</string>
     <string name="more_keys_for_apostrophe">\"</string>
-    <string name="more_keys_for_dash">_</string>
-    <!-- U+266A: "♪" EIGHTH NOTE
-         U+2665: "♥" BLACK HEART SUIT
-         U+2660: "♠" BLACK SPADE SUIT
-         U+2666: "♦" BLACK DIAMOND SUIT
-         U+2663: "♣" BLACK CLUB SUIT -->
-    <string name="more_keys_for_bullet">&#x266A;,&#x2665;,&#x2660;,&#x2666;,&#x2663;</string>
     <string name="more_keys_for_am_pm">!fixedColumnOrder!2,!hasLabels!,\@string/label_time_am,\@string/label_time_pm</string>
     <string name="settings_as_more_key">!icon/settings_key|!code/key_settings</string>
     <string name="shortcut_as_more_key">!icon/shortcut_key|!code/key_shortcut</string>
@@ -203,4 +198,24 @@
     <string name="label_time_pm">"PM"</string>
     <!-- Label for "switch to symbols" key on PC QWERTY layout -->
     <string name="label_to_symbol_key_pcqwerty">Sym</string>
+    <string name="keylabel_for_popular_domain">".com"</string>
+    <!-- popular web domains for the locale - most popular, displayed on the keyboard -->
+    <string name="more_keys_for_popular_domain">"!hasLabels!,.net,.org,.gov,.edu"</string>
+    <string name="more_keys_for_smiley">"!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ "</string>
+    <!-- U+064F: "ُ" ARABIC DAMMA
+         U+064C: "ٌ" ARABIC DAMMATAN
+         U+0651: "ّ" ARABIC SHADDA
+         U+0652: "ْ" ARABIC SUKUN
+         U+0653: "ٓ" ARABIC MADDAH ABOVE -->
+    <!-- U+064D: "ٍ" ARABIC KASRATAN
+         U+064B: "ً" ARABIC FATHATAN
+         U+0650: "ِ" ARABIC KASRA
+         U+064E: "َ" ARABIC FATHA
+         U+0640: "ـ" ARABIC TATWEEL -->
+    <!-- U+0656: "ٖ" ARABIC SUBSCRIPT ALEF
+         U+0670: "ٰ" ARABIC LETTER SUPERSCRIPT ALEF
+         U+0655: "ٕ" ARABIC HAMZA BELOW
+         U+0654: "ٔ" ARABIC HAMZA ABOVE -->
+    <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. -->
+    <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!5,&#x064F;,&#x064C;,&#x0651;,&#x0652;,&#x0653;,&#x064D;,&#x064B;,&#x0650;,&#x064E;,&#x0640;&#x0640;&#x0640;|&#x0640;,&#x0656;,&#x0670;,&#x0655;,&#x0654;"</string>
 </resources>