Merge "Import translations. DO NOT MERGE"
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/key_space.xml b/java/res/xml-sw600dp/key_space.xml
index 4e1e15b..234c803 100644
--- a/java/res/xml-sw600dp/key_space.xml
+++ b/java/res/xml-sw600dp/key_space.xml
@@ -30,7 +30,7 @@
                 latin:keyStyle="languageSwitchKeyStyle" />
             <Key
                 latin:keyStyle="spaceKeyStyle"
-                latin:keyWidth="21.950%p" />
+                latin:keyWidth="25.50%p" />
             <Key
                 latin:keyStyle="zwnjKeyStyle" />
         </case>
@@ -40,7 +40,7 @@
         >
             <Key
                 latin:keyStyle="spaceKeyStyle"
-                latin:keyWidth="30.850%p" />
+                latin:keyWidth="34.00%p" />
             <Key
                 latin:keyStyle="zwnjKeyStyle" />
         </case>
@@ -51,13 +51,13 @@
                 latin:keyStyle="languageSwitchKeyStyle" />
             <Key
                 latin:keyStyle="spaceKeyStyle"
-                latin:keyWidth="30.850%p" />
+                latin:keyWidth="34.00%p" />
         </case>
         <!-- languageSwitchKeyEnabled="false" -->
         <default>
             <Key
                 latin:keyStyle="spaceKeyStyle"
-                latin:keyWidth="39.750%p" />
+                latin:keyWidth="42.50%p" />
         </default>
     </switch>
 </merge>
diff --git a/java/res/xml-sw600dp/row_hebrew4.xml b/java/res/xml-sw600dp/row_hebrew4.xml
index 3d50c75..90441fb 100644
--- a/java/res/xml-sw600dp/row_hebrew4.xml
+++ b/java/res/xml-sw600dp/row_hebrew4.xml
@@ -22,19 +22,20 @@
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
     <Row
-        latin:keyWidth="8.9%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="toSymbolKeyStyle"
-            latin:keyWidth="13.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/keys_f1f2" />
         <include
+            latin:keyXPos="28.75%p"
             latin:keyboardLayout="@xml/key_space" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <include
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-8.5%p"
             latin:keyWidth="fillRight"
             latin:keyboardLayout="@xml/key_shortcut" />
     </Row>
diff --git a/java/res/xml-sw600dp/row_qwerty4.xml b/java/res/xml-sw600dp/row_qwerty4.xml
index a41dc64..5008696 100644
--- a/java/res/xml-sw600dp/row_qwerty4.xml
+++ b/java/res/xml-sw600dp/row_qwerty4.xml
@@ -22,22 +22,22 @@
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
     <Row
-        latin:keyWidth="8.9%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="toSymbolKeyStyle"
-            latin:keyWidth="13.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/keys_f1f2" />
         <include
-            latin:keyXPos="30.750%p"
+            latin:keyXPos="28.75%p"
             latin:keyboardLayout="@xml/key_space" />
         <include
             latin:keyboardLayout="@xml/key_apostrophe" />
         <include
             latin:keyboardLayout="@xml/key_dash" />
         <include
-            latin:keyXPos="-10.00%p"
+            latin:keyXPos="-8.5%p"
             latin:keyWidth="fillRight"
             latin:keyboardLayout="@xml/key_shortcut" />
     </Row>
diff --git a/java/res/xml-sw600dp/row_symbols4.xml b/java/res/xml-sw600dp/row_symbols4.xml
index 4c0ad23..a4fe5fa 100644
--- a/java/res/xml-sw600dp/row_symbols4.xml
+++ b/java/res/xml-sw600dp/row_symbols4.xml
@@ -22,17 +22,17 @@
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
     <Row
-        latin:keyWidth="8.9%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="toAlphaKeyStyle"
-            latin:keyWidth="13.0%p" />
+            latin:keyWidth="11.75%p" />
         <Key
             latin:keyStyle="smileyKeyStyle" />
         <Key
             latin:keyLabel="\@" />
         <include
-            latin:keyXPos="30.750%p"
+            latin:keyXPos="28.75%p"
             latin:keyboardLayout="@xml/key_space" />
         <Key
             latin:keyLabel="&quot;"
@@ -40,7 +40,7 @@
         <Key
             latin:keyLabel="_" />
         <include
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-8.5%p"
             latin:keyWidth="fillRight"
             latin:keyboardLayout="@xml/key_shortcut" />
     </Row>
diff --git a/java/res/xml-sw600dp/row_symbols_shift4.xml b/java/res/xml-sw600dp/row_symbols_shift4.xml
index 23db193..ffb6e7f 100644
--- a/java/res/xml-sw600dp/row_symbols_shift4.xml
+++ b/java/res/xml-sw600dp/row_symbols_shift4.xml
@@ -22,18 +22,18 @@
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
 >
     <Row
-        latin:keyWidth="8.9%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="toAlphaKeyStyle"
-            latin:keyWidth="13.0%p" />
+            latin:keyWidth="11.75%p" />
         <Key
             latin:keyStyle="smileyKeyStyle" />
         <include
-            latin:keyXPos="30.750%p"
+            latin:keyXPos="28.75%p"
             latin:keyboardLayout="@xml/key_space" />
         <include
-            latin:keyXPos="-10.00%p"
+            latin:keyXPos="-8.5%p"
             latin:keyWidth="fillRight"
             latin:keyboardLayout="@xml/key_shortcut" />
     </Row>
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_10_10_7_symbols.xml b/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
index fe9f2fb..d016eb8 100644
--- a/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
+++ b/java/res/xml-sw600dp/rows_10_10_7_symbols.xml
@@ -38,8 +38,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_symbols2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_symbols2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -49,12 +48,12 @@
     >
         <Key
             latin:keyStyle="toMoreSymbolKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols3" />
         <Key
-            latin:keyLabel="/"
-            latin:keyXPos="-8.5%p"
+            latin:keyStyle="toMoreSymbolKeyStyle"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml b/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml
index 9df1121..d4496b8 100644
--- a/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml
+++ b/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml
@@ -38,8 +38,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_symbols_shift2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_symbols_shift2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -49,9 +48,13 @@
     >
         <Key
             latin:keyStyle="backFromMoreSymbolKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols_shift3" />
+        <Key
+            latin:keyStyle="backFromMoreSymbolKeyStyle"
+            latin:keyXPos="-11.75%p"
+            latin:keyWidth="fillRight" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_symbols_shift4" />
diff --git a/java/res/xml-sw600dp/rows_arabic.xml b/java/res/xml-sw600dp/rows_arabic.xml
index c796a50..bc21854 100644
--- a/java/res/xml-sw600dp/rows_arabic.xml
+++ b/java/res/xml-sw600dp/rows_arabic.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_arabic1" />
@@ -33,21 +33,20 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_arabic2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_arabic2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_arabic3"
-            latin:keyXPos="10.0%p" />
+            latin:keyXPos="7.727%p" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_azerty.xml b/java/res/xml-sw600dp/rows_azerty.xml
index fbfecb3..137c654 100644
--- a/java/res/xml-sw600dp/rows_azerty.xml
+++ b/java/res/xml-sw600dp/rows_azerty.xml
@@ -37,8 +37,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_azerty2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_azerty2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -48,14 +47,14 @@
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_azerty3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_bulgarian.xml b/java/res/xml-sw600dp/rows_bulgarian.xml
index 8c41f96..682c72a 100644
--- a/java/res/xml-sw600dp/rows_bulgarian.xml
+++ b/java/res/xml-sw600dp/rows_bulgarian.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_bulgarian1"
@@ -34,28 +34,27 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_bulgarian2"
-            latin:keyXPos="4.500%p" />
+            latin:keyboardLayout="@xml/rowkeys_bulgarian2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.65%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_bulgarian3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
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-sw600dp/rows_colemak.xml b/java/res/xml-sw600dp/rows_colemak.xml
index b34957c..a943818 100644
--- a/java/res/xml-sw600dp/rows_colemak.xml
+++ b/java/res/xml-sw600dp/rows_colemak.xml
@@ -39,8 +39,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_colemak2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_colemak2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -50,14 +49,14 @@
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_colemak3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_dvorak.xml b/java/res/xml-sw600dp/rows_dvorak.xml
index d361c3e..83d1fee 100644
--- a/java/res/xml-sw600dp/rows_dvorak.xml
+++ b/java/res/xml-sw600dp/rows_dvorak.xml
@@ -39,8 +39,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_dvorak2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_dvorak2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -50,12 +49,12 @@
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_dvorak3" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_east_slavic.xml b/java/res/xml-sw600dp/rows_east_slavic.xml
index 3f8e50d..76a6cc3 100644
--- a/java/res/xml-sw600dp/rows_east_slavic.xml
+++ b/java/res/xml-sw600dp/rows_east_slavic.xml
@@ -24,42 +24,34 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_east_slavic1"
             latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
-        <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
-        <Key
-            latin:keyLabel="&#x044A;" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_east_slavic2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_east_slavic2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.363%p"
+        latin:keyWidth="7.727%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_east_slavic3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
-            latin:keyWidth="fillRight" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_farsi.xml b/java/res/xml-sw600dp/rows_farsi.xml
index 3b39b0a..9daba6d 100644
--- a/java/res/xml-sw600dp/rows_farsi.xml
+++ b/java/res/xml-sw600dp/rows_farsi.xml
@@ -24,38 +24,31 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_farsi1" />
+    </Row>
+    <Row
+        latin:keyWidth="7.727%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_farsi2" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_farsi2"
-            latin:keyXPos="4.5%p" />
-        <Key
-            latin:keyStyle="enterKeyStyle"
-            latin:keyWidth="fillBoth" />
-    </Row>
-    <Row
-        latin:keyWidth="7.6%p"
-    >
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
-        <include
-            latin:keyboardLayout="@xml/rowkeys_farsi3" />
+            latin:keyboardLayout="@xml/rowkeys_farsi3"
+            latin:keyXPos="7.727%p" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
-            latin:keyWidth="fillRight" />
+            latin:keyStyle="enterKeyStyle"
+            latin:keyWidth="fillBoth" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_georgian.xml b/java/res/xml-sw600dp/rows_georgian.xml
index 2e166bd..89ef09f 100644
--- a/java/res/xml-sw600dp/rows_georgian.xml
+++ b/java/res/xml-sw600dp/rows_georgian.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_georgian1"
@@ -34,28 +34,28 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_georgian2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_georgian3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_greek.xml b/java/res/xml-sw600dp/rows_greek.xml
index 85d5c8a..24cbd62 100644
--- a/java/res/xml-sw600dp/rows_greek.xml
+++ b/java/res/xml-sw600dp/rows_greek.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/key_greek_semicolon" />
@@ -36,28 +36,28 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_greek2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_greek3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_hebrew.xml b/java/res/xml-sw600dp/rows_hebrew.xml
index 55ce69a..0a7bdf1 100644
--- a/java/res/xml-sw600dp/rows_hebrew.xml
+++ b/java/res/xml-sw600dp/rows_hebrew.xml
@@ -40,8 +40,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_hebrew2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_hebrew2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -51,7 +50,7 @@
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_hebrew3"
-            latin:keyXPos="10.0%p" />
+            latin:keyXPos="11.75%p" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_hebrew4" />
diff --git a/java/res/xml-sw600dp/rows_hindi.xml b/java/res/xml-sw600dp/rows_hindi.xml
index c26439f..267e96f 100644
--- a/java/res/xml-sw600dp/rows_hindi.xml
+++ b/java/res/xml-sw600dp/rows_hindi.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_hindi1"
@@ -34,29 +34,24 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_hindi2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_hindi2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.5%p"
+        latin:keyWidth="7.727%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_hindi3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-7.5%p"
-            latin:keyWidth="fillRight" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_nordic.xml b/java/res/xml-sw600dp/rows_nordic.xml
index 4cc10d0..93373b6 100644
--- a/java/res/xml-sw600dp/rows_nordic.xml
+++ b/java/res/xml-sw600dp/rows_nordic.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_nordic1"
@@ -34,28 +34,29 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_nordic2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_nordic2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
+        <Spacer
+            latin:keyWidth="3.479%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_qwerty.xml b/java/res/xml-sw600dp/rows_qwerty.xml
index 9fc0e12..29aea3f 100644
--- a/java/res/xml-sw600dp/rows_qwerty.xml
+++ b/java/res/xml-sw600dp/rows_qwerty.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty1"
@@ -34,28 +34,28 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_qwertz.xml b/java/res/xml-sw600dp/rows_qwertz.xml
index de86444..abbc7db 100644
--- a/java/res/xml-sw600dp/rows_qwertz.xml
+++ b/java/res/xml-sw600dp/rows_qwertz.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_qwertz1"
@@ -34,28 +34,28 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_qwertz3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_south_slavic.xml b/java/res/xml-sw600dp/rows_south_slavic.xml
index 80eea6d..68d86a9 100644
--- a/java/res/xml-sw600dp/rows_south_slavic.xml
+++ b/java/res/xml-sw600dp/rows_south_slavic.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_south_slavic1"
@@ -34,29 +34,24 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.6%p"
+        latin:keyWidth="7.727%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_south_slavic2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_south_slavic2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.363%p"
+        latin:keyWidth="7.727%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_south_slavic3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-9.0%p"
-            latin:keyWidth="fillRight" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_spanish.xml b/java/res/xml-sw600dp/rows_spanish.xml
index 6aef1d7..8c965b2 100644
--- a/java/res/xml-sw600dp/rows_spanish.xml
+++ b/java/res/xml-sw600dp/rows_spanish.xml
@@ -37,8 +37,7 @@
         latin:keyWidth="8.5%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_spanish2"
-            latin:keyXPos="4.5%p" />
+            latin:keyboardLayout="@xml/rowkeys_spanish2" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
@@ -48,14 +47,14 @@
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty3" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_symbols.xml b/java/res/xml-sw600dp/rows_symbols.xml
index ada22df..57ec70d 100644
--- a/java/res/xml-sw600dp/rows_symbols.xml
+++ b/java/res/xml-sw600dp/rows_symbols.xml
@@ -26,7 +26,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_currency" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols1" />
@@ -35,26 +35,26 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
         <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="toMoreSymbolKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols3" />
         <Key
-            latin:keyLabel="/"
-            latin:keyXPos="-9.0%p"
+            latin:keyStyle="toMoreSymbolKeyStyle"
+            latin:keyXPos="-11.75%p"
             latin:keyWidth="fillRight" />
     </Row>
     <include
diff --git a/java/res/xml-sw600dp/rows_symbols_shift.xml b/java/res/xml-sw600dp/rows_symbols_shift.xml
index 0750670..c46661e 100644
--- a/java/res/xml-sw600dp/rows_symbols_shift.xml
+++ b/java/res/xml-sw600dp/rows_symbols_shift.xml
@@ -26,7 +26,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_currency" />
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols_shift1" />
@@ -35,23 +35,27 @@
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols_shift2"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="5.875%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="9.0%p"
+        latin:keyWidth="8.5%p"
     >
         <Key
             latin:keyStyle="backFromMoreSymbolKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_symbols_shift3" />
+        <Key
+            latin:keyStyle="backFromMoreSymbolKeyStyle"
+            latin:keyXPos="-11.75%p"
+            latin:keyWidth="fillRight" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_symbols_shift4" />
diff --git a/java/res/xml-sw600dp/rows_thai.xml b/java/res/xml-sw600dp/rows_thai.xml
index fea1baf..c387081 100644
--- a/java/res/xml-sw600dp/rows_thai.xml
+++ b/java/res/xml-sw600dp/rows_thai.xml
@@ -24,43 +24,42 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.800%p"
+        latin:keyWidth="7.354%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_thai1"
-            latin:keyXPos="4.0%p" />
+            latin:keyXPos="4.396%p" />
         <Key
             latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillRight" />
         </Row>
     <Row
-        latin:keyWidth="7.692%p"
+        latin:keyWidth="7.354%p"
     >
         <include
-            latin:keyboardLayout="@xml/rowkeys_thai2" />
+            latin:keyboardLayout="@xml/rowkeys_thai2"
+            latin:keyXPos="0.719%p" />
     </Row>
     <Row
-        latin:keyWidth="7.692%p"
+        latin:keyWidth="7.354%p"
     >
         <include
             latin:keyboardLayout="@xml/rowkeys_thai3"
-            latin:keyXPos="4.5%p" />
+            latin:keyXPos="4.396%p" />
         <Key
             latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
-        latin:keyWidth="7.692%p"
+        latin:keyWidth="7.354%p"
     >
         <Key
             latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.0%p" />
+            latin:keyWidth="11.75%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_thai4" />
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-10.0%p"
-            latin:keyWidth="fillRight" />
+        <include
+            latin:keyboardLayout="@xml/keys_comma_period" />
     </Row>
     <include
         latin:keyboardLayout="@xml/row_qwerty4" />
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-sw768dp/rows_farsi.xml b/java/res/xml-sw768dp/rows_farsi.xml
index 28ea6ff..8a70df9 100644
--- a/java/res/xml-sw768dp/rows_farsi.xml
+++ b/java/res/xml-sw768dp/rows_farsi.xml
@@ -24,7 +24,7 @@
     <include
         latin:keyboardLayout="@xml/key_styles_common" />
     <Row
-        latin:keyWidth="7.000%p"
+        latin:keyWidth="7.125%p"
     >
         <Key
             latin:keyStyle="tabKeyStyle"
@@ -32,9 +32,6 @@
             latin:keyWidth="7.969%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_farsi1" />
-        <Key
-            latin:keyStyle="deleteKeyStyle"
-            latin:keyWidth="fillBoth" />
     </Row>
     <Row
         latin:keyWidth="7.125%p"
@@ -46,22 +43,19 @@
         <include
             latin:keyboardLayout="@xml/rowkeys_farsi2" />
         <Key
-            latin:keyStyle="enterKeyStyle"
+            latin:keyStyle="deleteKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <Row
         latin:keyWidth="7.375%p"
     >
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="13.829%p"/>
         <include
-            latin:keyboardLayout="@xml/rowkeys_farsi3" />
+            latin:keyboardLayout="@xml/rowkeys_farsi3"
+            latin:keyXPos="13.829%p" />
         <include
             latin:keyboardLayout="@xml/keys_comma_period" />
         <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyXPos="-13.750%p"
+            latin:keyStyle="enterKeyStyle"
             latin:keyWidth="fillBoth" />
     </Row>
     <include
diff --git a/java/res/xml-sw768dp/rows_greek.xml b/java/res/xml-sw768dp/rows_greek.xml
index c0b38dc..cf2fa40 100644
--- a/java/res/xml-sw768dp/rows_greek.xml
+++ b/java/res/xml-sw768dp/rows_greek.xml
@@ -35,6 +35,9 @@
         <include
             latin:keyboardLayout="@xml/rowkeys_greek1"
             latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillBoth"/>
     </Row>
     <Row
         latin:keyWidth="8.125%p"
diff --git a/java/res/xml-sw768dp/rows_nordic.xml b/java/res/xml-sw768dp/rows_nordic.xml
index fbee1c3..9a45251 100644
--- a/java/res/xml-sw768dp/rows_nordic.xml
+++ b/java/res/xml-sw768dp/rows_nordic.xml
@@ -56,6 +56,8 @@
         <Key
             latin:keyStyle="shiftKeyStyle"
             latin:keyWidth="13.829%p" />
+        <Spacer
+            latin:keyWidth="3.689%p" />
         <include
             latin:keyboardLayout="@xml/rowkeys_qwerty3" />
         <include
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/accessibility/AccessibilityEntityProvider.java b/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
index 004ee4c..d7cd8e2 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
@@ -18,7 +18,6 @@
 
 import android.graphics.Rect;
 import android.inputmethodservice.InputMethodService;
-import android.os.Bundle;
 import android.support.v4.view.ViewCompat;
 import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
 import android.support.v4.view.accessibility.AccessibilityNodeProviderCompat;
@@ -34,10 +33,6 @@
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.KeyboardView;
 
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
 /**
  * Exposes a virtual view sub-tree for {@link KeyboardView} and generates
  * {@link AccessibilityEvent}s for individual {@link Key}s.
@@ -95,7 +90,6 @@
         final AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
         event.setPackageName(mKeyboardView.getContext().getPackageName());
         event.setClassName(key.getClass().getName());
-        event.getText().add(keyDescription);
         event.setEnabled(true);
 
         final AccessibilityRecordCompat record = new AccessibilityRecordCompat(event);
@@ -136,7 +130,6 @@
             ViewCompat.onInitializeAccessibilityNodeInfo(mKeyboardView, info);
 
             // Add the virtual children of the root View.
-            // TODO: Need to assign a unique ID to each key.
             final Keyboard keyboard = mKeyboardView.getKeyboard();
             final Key[] keys = keyboard.mKeys;
             for (Key key : keys) {
@@ -163,8 +156,6 @@
             // Obtain and initialize an AccessibilityNodeInfo with
             // information about the virtual view.
             info = AccessibilityNodeInfoCompat.obtain();
-            info.addAction(AccessibilityNodeInfoCompat.ACTION_SELECT);
-            info.addAction(AccessibilityNodeInfoCompat.ACTION_CLEAR_SELECTION);
             info.setPackageName(mKeyboardView.getContext().getPackageName());
             info.setClassName(key.getClass().getName());
             info.setBoundsInParent(boundsInParent);
@@ -173,155 +164,13 @@
             info.setSource(mKeyboardView, virtualViewId);
             info.setBoundsInScreen(boundsInScreen);
             info.setText(keyDescription);
-            info.setClickable(true);
             info.setEnabled(true);
-            info.setLongClickable(true);
         }
 
         return info;
     }
 
     /**
-     * Performs an accessibility action on a virtual view, i.e. a descendant of
-     * the host View, with the given <code>virtualViewId</code> or the host View itself if
-     * <code>virtualViewId</code> equals to {@link View#NO_ID}.
-     *
-     * @param virtualViewId A client defined virtual view id.
-     * @param action The action to perform.
-     * @param arguments Optional arguments.
-     * @return True if the action was performed.
-     * @see #createAccessibilityNodeInfo(int)
-     * @see AccessibilityNodeInfoCompat
-     */
-    @Override
-    public boolean performAction(int virtualViewId, int action, Bundle arguments) {
-        if (virtualViewId == View.NO_ID) {
-            // Perform the action on the host View.
-            switch (action) {
-            case AccessibilityNodeInfoCompat.ACTION_SELECT:
-                if (!mKeyboardView.isSelected()) {
-                    mKeyboardView.setSelected(true);
-                    return mKeyboardView.isSelected();
-                }
-                break;
-            case AccessibilityNodeInfoCompat.ACTION_CLEAR_SELECTION:
-                if (mKeyboardView.isSelected()) {
-                    mKeyboardView.setSelected(false);
-                    return !mKeyboardView.isSelected();
-                }
-                break;
-            }
-        } else {
-            // Find the view that corresponds to the given id.
-            final Key child = mVirtualViewIdToKey.get(virtualViewId);
-            if (child == null)
-                return false;
-
-            // Perform the action on a virtual view.
-            switch (action) {
-            case AccessibilityNodeInfoCompat.ACTION_SELECT:
-                // TODO: Provide some focus indicator.
-                return true;
-            case AccessibilityNodeInfoCompat.ACTION_CLEAR_SELECTION:
-                // TODO: Provide some clear focus indicator.
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Finds {@link AccessibilityNodeInfoCompat}s by text. The match is case
-     * insensitive containment. The search is relative to the virtual view, i.e.
-     * a descendant of the host View, with the given <code>virtualViewId</code> or the host
-     * View itself <code>virtualViewId</code> equals to {@link View#NO_ID}.
-     *
-     * @param virtualViewId A client defined virtual view id which defined the
-     *            root of the tree in which to perform the search.
-     * @param text The searched text.
-     * @return A list of node info.
-     * @see #createAccessibilityNodeInfo(int)
-     * @see AccessibilityNodeInfoCompat
-     */
-    @Override
-    public List<AccessibilityNodeInfoCompat> findAccessibilityNodeInfosByText(
-            String text, int virtualViewId) {
-        final String searchedLowerCase = text.toLowerCase();
-        final Keyboard keyboard = mKeyboardView.getKeyboard();
-
-        List<AccessibilityNodeInfoCompat> results = null;
-
-        if (virtualViewId == View.NO_ID) {
-            for (Key key : keyboard.mKeys) {
-                results = findByTextAndPopulate(searchedLowerCase, key, results);
-            }
-        } else {
-            final Key key = mVirtualViewIdToKey.get(virtualViewId);
-
-            results = findByTextAndPopulate(searchedLowerCase, key, results);
-        }
-
-        if (results == null) {
-            return Collections.emptyList();
-        }
-
-        return results;
-    }
-
-    /**
-     * Helper method for {@link #findAccessibilityNodeInfosByText(String, int)}.
-     * Takes a current set of results and matches a specified key against a
-     * lower-case search string. Returns an updated list of results.
-     *
-     * @param searchedLowerCase The lower-case search string.
-     * @param key The key to compare against.
-     * @param results The current list of results, or {@code null} if no results
-     *            found.
-     * @return An updated list of results, or {@code null} if no results found.
-     */
-    private List<AccessibilityNodeInfoCompat> findByTextAndPopulate(String searchedLowerCase,
-            Key key, List<AccessibilityNodeInfoCompat> results) {
-        if (!keyContainsText(key, searchedLowerCase)) {
-            return results;
-        }
-
-        final int childVirtualViewId = generateVirtualViewIdForKey(key);
-        final AccessibilityNodeInfoCompat nodeInfo = createAccessibilityNodeInfo(
-                childVirtualViewId);
-
-        if (results == null) {
-            results = new LinkedList<AccessibilityNodeInfoCompat>();
-        }
-
-        results.add(nodeInfo);
-
-        return results;
-    }
-
-    /**
-     * Returns whether a key's current description contains the lower-case
-     * search text.
-     *
-     * @param key The key to compare against.
-     * @param textLowerCase The lower-case search string.
-     * @return {@code true} if the key contains the search text.
-     */
-    private boolean keyContainsText(Key key, String textLowerCase) {
-        if (key == null) {
-            return false;
-        }
-
-        final String description = getKeyDescription(key);
-
-        if (description == null) {
-            return false;
-        }
-
-        return description.toLowerCase().contains(textLowerCase);
-    }
-
-    /**
      * Returns the context-specific description for a {@link Key}.
      *
      * @param key The key to describe.
@@ -362,14 +211,17 @@
     }
 
     /**
-     * Generates a virtual view identifier for the specified key.
+     * Generates a virtual view identifier for the given key. Returned
+     * identifiers are valid until the next global layout state change.
      *
      * @param key The key to identify.
      * @return A virtual view identifier.
      */
     private static int generateVirtualViewIdForKey(Key key) {
-        // The key code is unique within an instance of a Keyboard.
-        return key.mCode;
+        // The key x- and y-coordinates are stable between layout changes.
+        // Generate an identifier by bit-shifting the x-coordinate to the
+        // left-half of the integer and OR'ing with the y-coordinate.
+        return ((0xFFFF & key.mX) << (Integer.SIZE / 2)) | (0xFFFF & key.mY);
     }
 
     private final OnGlobalLayoutListener mGlobalLayoutListener = new OnGlobalLayoutListener() {
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/EditingUtils.java b/java/src/com/android/inputmethod/latin/EditingUtils.java
index 7d67317..93106ac 100644
--- a/java/src/com/android/inputmethod/latin/EditingUtils.java
+++ b/java/src/com/android/inputmethod/latin/EditingUtils.java
@@ -38,8 +38,7 @@
 
     private static int getCursorPosition(InputConnection connection) {
         if (null == connection) return INVALID_CURSOR_POSITION;
-        ExtractedText extracted = connection.getExtractedText(
-            new ExtractedTextRequest(), 0);
+        final ExtractedText extracted = connection.getExtractedText(new ExtractedTextRequest(), 0);
         if (extracted == null) {
             return INVALID_CURSOR_POSITION;
         }
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e8211ae..fd8f782 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/makedict/BinaryDictInputOutput.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java
index d82d503..3c818cc 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java
@@ -174,6 +174,7 @@
     private static final int MAX_CHARGROUPS_IN_A_NODE = 0x7FFF; // 32767
 
     private static final int MAX_TERMINAL_FREQUENCY = 255;
+    private static final int MAX_BIGRAM_FREQUENCY = 15;
 
     // Arbitrary limit to how much passes we consider address size compression should
     // terminate in. At the time of this writing, our largest dictionary completes
@@ -722,15 +723,17 @@
     }
 
     /**
-     * Makes the flag value for an attribute.
+     * Makes the flag value for a bigram.
      *
-     * @param more whether there are more attributes after this one.
-     * @param offset the offset of the attribute.
-     * @param frequency the frequency of the attribute, 0..15
+     * @param more whether there are more bigrams after this one.
+     * @param offset the offset of the bigram.
+     * @param bigramFrequency the frequency of the bigram, 0..255.
+     * @param unigramFrequency the unigram frequency of the same word, 0..255.
+     * @param word the second bigram, for debugging purposes
      * @return the flags
      */
-    private static final int makeAttributeFlags(final boolean more, final int offset,
-            final int frequency) {
+    private static final int makeBigramFlags(final boolean more, final int offset,
+            int bigramFrequency, final int unigramFrequency, final String word) {
         int bigramFlags = (more ? FLAG_ATTRIBUTE_HAS_NEXT : 0)
                 + (offset < 0 ? FLAG_ATTRIBUTE_OFFSET_NEGATIVE : 0);
         switch (getByteSize(offset)) {
@@ -746,7 +749,21 @@
         default:
             throw new RuntimeException("Strange offset size");
         }
-        bigramFlags += frequency & FLAG_ATTRIBUTE_FREQUENCY;
+        if (unigramFrequency > bigramFrequency) {
+            MakedictLog.e("Unigram freq is superior to bigram freq for \"" + word
+                    + "\". Bigram freq is " + bigramFrequency + ", unigram freq for "
+                    + word + " is " + unigramFrequency);
+            bigramFrequency = unigramFrequency;
+        }
+        // We compute the difference between 255 (which means probability = 1) and the
+        // unigram score. We split this into discrete 16 steps, and this is the value
+        // we store into the 4 bits of the bigrams frequency.
+        final float bigramRatio = (float)(bigramFrequency - unigramFrequency)
+                / (MAX_TERMINAL_FREQUENCY - unigramFrequency);
+        // TODO: if the bigram freq is very close to the unigram frequency, we don't want
+        // to include the bigram in the binary dictionary at all.
+        final int discretizedFrequency = Math.round(bigramRatio * MAX_BIGRAM_FREQUENCY);
+        bigramFlags += discretizedFrequency & FLAG_ATTRIBUTE_FREQUENCY;
         return bigramFlags;
     }
 
@@ -854,11 +871,14 @@
                 final Iterator bigramIterator = group.mBigrams.iterator();
                 while (bigramIterator.hasNext()) {
                     final WeightedString bigram = (WeightedString)bigramIterator.next();
-                    final int addressOfBigram = findAddressOfWord(dict, bigram.mWord);
+                    final CharGroup target =
+                            FusionDictionary.findWordInTree(dict.mRoot, bigram.mWord);
+                    final int addressOfBigram = target.mCachedAddress;
+                    final int unigramFrequencyForThisWord = target.mFrequency;
                     ++groupAddress;
                     final int offset = addressOfBigram - groupAddress;
-                    int bigramFlags = makeAttributeFlags(bigramIterator.hasNext(), offset,
-                            bigram.mFrequency);
+                    int bigramFlags = makeBigramFlags(bigramIterator.hasNext(), offset,
+                            bigram.mFrequency, unigramFrequencyForThisWord, bigram.mWord);
                     buffer[index++] = (byte)bigramFlags;
                     final int bigramShift = writeVariableAddress(buffer, index, Math.abs(offset));
                     index += bigramShift;
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/native/jni/src/bigram_dictionary.cpp b/native/jni/src/bigram_dictionary.cpp
index 220b340..0703108 100644
--- a/native/jni/src/bigram_dictionary.cpp
+++ b/native/jni/src/bigram_dictionary.cpp
@@ -20,8 +20,9 @@
 #define LOG_TAG "LatinIME: bigram_dictionary.cpp"
 
 #include "bigram_dictionary.h"
-#include "dictionary.h"
 #include "binary_format.h"
+#include "bloom_filter.h"
+#include "dictionary.h"
 
 namespace latinime {
 
@@ -153,16 +154,6 @@
     return pos;
 }
 
-static inline void setInFilter(uint8_t *filter, const int position) {
-    const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
-    filter[bucket >> 3] |= (1 << (bucket & 0x7));
-}
-
-static inline bool isInFilter(uint8_t *filter, const int position) {
-    const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
-    return filter[bucket >> 3] & (1 << (bucket & 0x7));
-}
-
 void BigramDictionary::fillBigramAddressToFrequencyMapAndFilter(const int32_t *prevWord,
         const int prevWordLength, std::map<int, int> *map, uint8_t *filter) {
     memset(filter, 0, BIGRAM_FILTER_BYTE_SIZE);
diff --git a/native/jni/src/binary_format.h b/native/jni/src/binary_format.h
index 71ade48..b87593c 100644
--- a/native/jni/src/binary_format.h
+++ b/native/jni/src/binary_format.h
@@ -18,6 +18,7 @@
 #define LATINIME_BINARY_FORMAT_H
 
 #include <limits>
+#include "bloom_filter.h"
 #include "unigram_dictionary.h"
 
 namespace latinime {
@@ -66,8 +67,8 @@
             const int length);
     static int getWordAtAddress(const uint8_t* const root, const int address, const int maxDepth,
             uint16_t* outWord);
-    static int getProbability(const std::map<int, int> *bigramMap, const uint8_t *bigramFilter,
-            const int unigramFreq);
+    static int getProbability(const int position, const std::map<int, int> *bigramMap,
+            const uint8_t *bigramFilter, const int unigramFreq);
 
     // Flags for special processing
     // Those *must* match the flags in makedict (BinaryDictInputOutput#*_PROCESSING_FLAG) or
@@ -520,13 +521,18 @@
 }
 
 // This should probably return a probability in log space.
-inline int BinaryFormat::getProbability(const std::map<int, int> *bigramMap,
+inline int BinaryFormat::getProbability(const int position, const std::map<int, int> *bigramMap,
         const uint8_t *bigramFilter, const int unigramFreq) {
-    // TODO: use the bigram filter for fast rejection, then the bigram map for lookup
-    // to get the bigram probability. If the bigram is not found, use the unigram frequency.
-    // Don't forget that they can be null.
+    if (!bigramMap || !bigramFilter) return unigramFreq;
+    if (!isInFilter(bigramFilter, position)) return unigramFreq;
+    const std::map<int, int>::const_iterator bigramFreq = bigramMap->find(position);
+    if (bigramFreq != bigramMap->end()) {
+        // TODO: return the frequency in bigramFreq->second
+        return unigramFreq;
+    } else {
+        return unigramFreq;
+    }
     // TODO: if the unigram frequency is used, compute the actual probability
-    return unigramFreq;
 }
 
 } // namespace latinime
diff --git a/native/jni/src/bloom_filter.h b/native/jni/src/bloom_filter.h
new file mode 100644
index 0000000..7ae6a1f
--- /dev/null
+++ b/native/jni/src/bloom_filter.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#ifndef LATINIME_BLOOM_FILTER_H
+#define LATINIME_BLOOM_FILTER_H
+
+#include <stdint.h>
+
+#include "defines.h"
+
+namespace latinime {
+
+static inline void setInFilter(uint8_t *filter, const int position) {
+    const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
+    filter[bucket >> 3] |= (1 << (bucket & 0x7));
+}
+
+static inline bool isInFilter(const uint8_t *filter, const int position) {
+    const unsigned int bucket = position % BIGRAM_FILTER_MODULO;
+    return filter[bucket >> 3] & (1 << (bucket & 0x7));
+}
+
+} // namespace latinime
+
+#endif // LATINIME_BLOOM_FILTER_H
diff --git a/native/jni/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp
index 2e5468d..9234b1b 100644
--- a/native/jni/src/unigram_dictionary.cpp
+++ b/native/jni/src/unigram_dictionary.cpp
@@ -851,7 +851,8 @@
         TerminalAttributes terminalAttributes(DICT_ROOT, flags, attributesPos);
         // bigramMap contains the bigram frequencies indexed by addresses for fast lookup.
         // bigramFilter is a bloom filter of said frequencies for even faster rejection.
-        const int probability = BinaryFormat::getProbability(bigramMap, bigramFilter, unigramFreq);
+        const int probability = BinaryFormat::getProbability(initialPos, bigramMap, bigramFilter,
+                unigramFreq);
         onTerminal(probability, terminalAttributes, correction, queuePool, needsToInvokeOnTerminal,
                 currentWordIndex);
 
diff --git a/tools/makedict/src/com/android/inputmethod/latin/makedict/XmlDictInputOutput.java b/tools/makedict/src/com/android/inputmethod/latin/makedict/XmlDictInputOutput.java
index d86719a..52f124d 100644
--- a/tools/makedict/src/com/android/inputmethod/latin/makedict/XmlDictInputOutput.java
+++ b/tools/makedict/src/com/android/inputmethod/latin/makedict/XmlDictInputOutput.java
@@ -154,7 +154,7 @@
         // In this version of the XML file, the bigram frequency is given as an int 0..XML_MAX
         private final static int XML_MAX = 256;
         // In memory and in the binary dictionary the bigram frequency is 0..MEMORY_MAX
-        private final static int MEMORY_MAX = 16;
+        private final static int MEMORY_MAX = 256;
         private final static int XML_TO_MEMORY_RATIO = XML_MAX / MEMORY_MAX;
 
         private String mSrc;
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>