Merge "Guard possible NumberFormatException"
diff --git a/java/res/values-am/strings.xml b/java/res/values-am/strings.xml
index 6d4c5bf..13fe7f8 100644
--- a/java/res/values-am/strings.xml
+++ b/java/res/values-am/strings.xml
@@ -210,10 +210,10 @@
     <string name="message_updating" msgid="4457761393932375219">"ዝማኔዎችን በመፈለግ ላይ"</string>
     <string name="message_loading" msgid="5638680861387748936">"በመጫን ላይ…"</string>
     <string name="main_dict_description" msgid="3072821352793492143">"ዋና መዝገበ-ቃላት"</string>
-    <string name="cancel" msgid="6830980399865683324">"ሰርዝ"</string>
+    <string name="cancel" msgid="6830980399865683324">"ይቅር"</string>
     <string name="go_to_settings" msgid="3876892339342569259">"ቅንብሮች"</string>
     <string name="install_dict" msgid="180852772562189365">"ጫን"</string>
-    <string name="cancel_download_dict" msgid="7843340278507019303">"ሰርዝ"</string>
+    <string name="cancel_download_dict" msgid="7843340278507019303">"ይቅር"</string>
     <string name="delete_dict" msgid="756853268088330054">"ሰርዝ"</string>
     <string name="should_download_over_metered_prompt" msgid="1583881200688185508">"በተንቀሳቃሽ መሣሪያዎ ላይ ለተመረጠው ቋንቋ የሚሆን መዝገበ-ቃላት ይገኛል።&lt;br/&gt; የትየባ ተሞክሮዎን ለማሻሻል የ<xliff:g id="LANGUAGE_NAME">%1$s</xliff:g> መዝገበ-ቃላቱን &lt;b&gt;እንዲያወርዱ&lt;/b&gt; እንመክራለን።&lt;br/&gt; &lt;br/&gt; ማውረድ በ3ጂ ላይ አንድ ወይም ሁለት ደቂቃ ሊወስድ ይችላል። &lt;b&gt;ያልተገደበ የውሂብ ዕቅድ&lt;/b&gt; ከሌለዎት ክፍያዎች መከፈል ሊኖርባቸው ይችላል።&lt;br/&gt; የትኛው የውሂብ ዕቅድ እንዳለዎት እርግጠኛ ካልሆኑ ውርዱን በራስ-ሰር ለመጀመር የWi-Fi ግንኙነት እንዲፈልጉ እንመክራለን።&lt;br/&gt; &lt;br/&gt; ጠቃሚ ምክር፦ የተንቀሳቃሽ መሣሪያዎ &lt;b&gt;ቅንብሮች&lt;/b&gt; ምናሌ ውስጥ ወዳለው &lt;b&gt;ቋንቋ እና ግብዓት&lt;/b&gt; በመሄድ መዝገበ-ቃላትን ማውረድና ማስወገድ ይችላሉ።"</string>
     <string name="download_over_metered" msgid="1643065851159409546">"አሁን አውርድ (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g> ሜባ)"</string>
diff --git a/java/res/xml-sw600dp/rows_myanmar.xml b/java/res/xml-sw600dp/rows_myanmar.xml
new file mode 100644
index 0000000..778b330
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_myanmar.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="8.1818%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar1" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillRight" />
+        </Row>
+    <Row
+        latin:keyWidth="8.1818%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar2" />
+    </Row>
+    <Row
+        latin:keyWidth="8.1818%p"
+    >
+        <include
+            latin:keyXPos="4.0909%p"
+            latin:keyboardLayout="@xml/rowkeys_myanmar3" />
+        <Key
+            latin:keyStyle="enterKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <Row
+        latin:keyWidth="8.1818%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle"
+            latin:keyWidth="10.0%p" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar4" />
+        <switch>
+            <case
+                latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            >
+                <Spacer />
+            </case>
+            <default>
+                <include
+                    latin:keyboardLayout="@xml/keys_exclamation_question" />
+            </default>
+        </switch>
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_myanmar.xml b/java/res/xml/kbd_myanmar.xml
new file mode 100644
index 0000000..af997b1
--- /dev/null
+++ b/java/res/xml/kbd_myanmar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<Keyboard
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+    latin:rowHeight="20%p"
+    latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+    latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+    latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
+    latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
+>
+    <include
+        latin:keyboardLayout="@xml/rows_myanmar" />
+</Keyboard>
diff --git a/java/res/xml/keyboard_layout_set_myanmar.xml b/java/res/xml/keyboard_layout_set_myanmar.xml
new file mode 100644
index 0000000..5c823b2
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_myanmar.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<KeyboardLayoutSet
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Element
+        latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_myanmar"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="alphabetAutomaticShifted"
+        latin:elementKeyboard="@xml/kbd_myanmar"
+        latin:enableProximityCharsCorrection="true" />
+    <!-- On these shifted alphabet layouts the proximity characters correction should be disabled
+         because the letters on these layouts aren't the ones in different case of the above
+         unshifted layouts. -->
+    <Element
+        latin:elementName="alphabetManualShifted"
+        latin:elementKeyboard="@xml/kbd_myanmar" />
+    <Element
+        latin:elementName="alphabetShiftLocked"
+        latin:elementKeyboard="@xml/kbd_myanmar" />
+    <Element
+        latin:elementName="alphabetShiftLockShifted"
+        latin:elementKeyboard="@xml/kbd_myanmar" />
+    <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 deef9d1..49b0df1 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -64,6 +64,7 @@
     mk: Macedonian/south_slavic
     mn_MN: Mongolian (Mongolia)/mongolian
     ms_MY: Malay (Malaysia)/qwerty
+    (my_MM: Myanmar (Myanmar)/myanmar) # This is a preliminary keyboard layout.
     nb: Norwegian Bokmål/nordic
     ne_NP: Nepali (Nepal) Romanized/nepali_romanized
     ne_NP: Nepali (Nepal) Traditional/nepali_traditional
@@ -431,6 +432,8 @@
             android:imeSubtypeExtraValue="KeyboardLayoutSet=mongolian,EmojiCapable"
             android:isAsciiCapable="false"
     />
+    <!-- TODO: This Myanmar keyboard is a preliminary layout.
+               This isn't based on the final specification. -->
     <subtype android:icon="@drawable/ic_ime_switcher_dark"
             android:label="@string/subtype_generic"
             android:subtypeId="0x84c87c61"
@@ -441,6 +444,14 @@
     />
     <subtype android:icon="@drawable/ic_ime_switcher_dark"
             android:label="@string/subtype_generic"
+            android:subtypeId="0xea266ea4"
+            android:imeSubtypeLocale="my_MM"
+            android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=myanmar,EmojiCapable"
+            android:isAsciiCapable="false"
+    />
+    <subtype android:icon="@drawable/ic_ime_switcher_dark"
+            android:label="@string/subtype_generic"
             android:subtypeId="0x3f12ee14"
             android:imeSubtypeLocale="nb"
             android:imeSubtypeMode="keyboard"
diff --git a/java/res/xml/rowkeys_myanmar1.xml b/java/res/xml/rowkeys_myanmar1.xml
new file mode 100644
index 0000000..6460af5
--- /dev/null
+++ b/java/res/xml/rowkeys_myanmar1.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+        >
+            <!-- U+100E: "ဎ" MYANMAR LETTER DDHA -->
+            <Key
+                latin:keySpec="&#x100E;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+100D: "ဍ" MYANMAR LETTER DDA -->
+            <Key
+                latin:keySpec="&#x100D;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1052: "ၒ" MYANMAR LETTER VOCALIC R -->
+            <Key
+                latin:keySpec="&#x1052;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+100B: "ဋ" MYANMAR LETTER TTA -->
+            <Key
+                latin:keySpec="&#x100B;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1053: "ၓ" MYANMAR LETTER VOCALIC RR -->
+            <Key
+                latin:keySpec="&#x1053;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1054: "ၔ" MYANMAR LETTER VOCALIC L -->
+            <Key
+                latin:keySpec="&#x1054;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1055: "ၕ" MYANMAR LETTER VOCALIC LL -->
+            <Key
+                latin:keySpec="&#x1055;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101B: "ရ" MYANMAR LETTER RA -->
+            <Key
+                latin:keySpec="&#x101B;"
+                latin:keyLabelFlags="fontNormal" />
+            <Key
+                latin:keySpec="*" />
+            <Key
+                latin:keySpec="(" />
+            <Key
+                latin:keySpec=")" />
+        </case>
+        <default>
+            <!-- U+1050: "ၐ" MYANMAR LETTER SHA -->
+            <Key
+                latin:keySpec="&#x1050;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1041: "၁" MYANMAR DIGIT ONE -->
+            <Key
+                latin:keySpec="&#x1041;"
+                latin:keyHintLabel="1"
+                latin:additionalMoreKeys="1"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1042: "၂" MYANMAR DIGIT TWO -->
+            <Key
+                latin:keySpec="&#x1042;"
+                latin:keyHintLabel="2"
+                latin:additionalMoreKeys="2"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1043: "၃" MYANMAR DIGIT THREE -->
+            <Key
+                latin:keySpec="&#x1043;"
+                latin:keyHintLabel="3"
+                latin:additionalMoreKeys="3"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1044: "၄" MYANMAR DIGIT FOUR -->
+            <Key
+                latin:keySpec="&#x1044;"
+                latin:keyHintLabel="4"
+                latin:additionalMoreKeys="4"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1045: "၅" MYANMAR DIGIT FIVE -->
+            <Key
+                latin:keySpec="&#x1045;"
+                latin:keyHintLabel="5"
+                latin:additionalMoreKeys="5"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1046: "၆" MYANMAR DIGIT SIX -->
+            <Key
+                latin:keySpec="&#x1046;"
+                latin:keyHintLabel="6"
+                latin:additionalMoreKeys="6"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1047: "၇" MYANMAR DIGIT SEVEN -->
+            <Key
+                latin:keySpec="&#x1047;"
+                latin:keyHintLabel="7"
+                latin:additionalMoreKeys="7"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1048: "၈" MYANMAR DIGIT EIGHT -->
+            <Key
+                latin:keySpec="&#x1048;"
+                latin:keyHintLabel="8"
+                latin:additionalMoreKeys="8"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1049: "၉" MYANMAR DIGIT NINE -->
+            <Key
+                latin:keySpec="&#x1049;"
+                latin:keyHintLabel="9"
+                latin:additionalMoreKeys="9"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1040: "၀" MYANMAR DIGIT ZERO -->
+            <Key
+                latin:keySpec="&#x1040;"
+                latin:keyHintLabel="0"
+                latin:additionalMoreKeys="0"
+                latin:keyLabelFlags="fontNormal" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_myanmar2.xml b/java/res/xml/rowkeys_myanmar2.xml
new file mode 100644
index 0000000..558c38d
--- /dev/null
+++ b/java/res/xml/rowkeys_myanmar2.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+        >
+            <!-- U+1008: "ဈ" MYANMAR LETTER JHA -->
+            <Key
+                latin:keySpec="&#x1008;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101D: "ဝ" MYANMAR LETTER WA -->
+            <Key
+                latin:keySpec="&#x101D;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1023: "ဣ" MYANMAR LETTER I -->
+            <Key
+                latin:keySpec="&#x1023;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+104E: "၎" MYANMAR SYMBOL AFOREMENTIONED -->
+            <Key
+                latin:keySpec="&#x104E;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1024: "ဤ" MYANMAR LETTER II -->
+            <Key
+                latin:keySpec="&#x1024;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+104C: "၌" MYANMAR SYMBOL LOCATIVE -->
+            <Key
+                latin:keySpec="&#x104C;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1025: "ဥ" MYANMAR LETTER U -->
+            <Key
+                latin:keySpec="&#x1025;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+104D: "၍" MYANMAR SYMBOL COMPLETED -->
+            <Key
+                latin:keySpec="&#x104D;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103F: "ဿ" MYANMAR LETTER GREAT SA -->
+            <Key
+                latin:keySpec="&#x103F;"
+                latin:keyLabelFlags="fontNormal|autoXScale" />
+            <!-- U+100F: "ဏ" MYANMAR LETTER NNA -->
+            <Key
+                latin:keySpec="&#x100F;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1027: "ဧ" MYANMAR LETTER E -->
+            <Key
+                latin:keySpec="&#x1027;"
+                latin:keyLabelFlags="fontNormal" />
+        </case>
+        <default>
+            <!-- U+1006: "ဆ" MYANMAR LETTER CHA -->
+            <Key
+                latin:keySpec="&#x1006;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1010: "တ" MYANMAR LETTER TA -->
+            <Key
+                latin:keySpec="&#x1010;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1014: "န" MYANMAR LETTER NA -->
+            <Key
+                latin:keySpec="&#x1014;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1019: "မ" MYANMAR LETTER MA -->
+            <Key
+                latin:keySpec="&#x1019;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1021: "အ" MYANMAR LETTER A -->
+            <Key
+                latin:keySpec="&#x1021;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1015: "ပ" MYANMAR LETTER PA -->
+            <Key
+                latin:keySpec="&#x1015;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1000: "က" MYANMAR LETTER KA -->
+            <Key
+                latin:keySpec="&#x1000;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1004: "င" MYANMAR LETTER NGA -->
+            <Key
+                latin:keySpec="&#x1004;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101E: "သ" MYANMAR LETTER SA -->
+            <Key
+                latin:keySpec="&#x101E;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1005: "စ" MYANMAR LETTER CA -->
+            <Key
+                latin:keySpec="&#x1005;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101F: "ဟ" MYANMAR LETTER HA -->
+            <Key
+                latin:keySpec="&#x101F;"
+                latin:keyLabelFlags="fontNormal" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_myanmar3.xml b/java/res/xml/rowkeys_myanmar3.xml
new file mode 100644
index 0000000..2d0d48c
--- /dev/null
+++ b/java/res/xml/rowkeys_myanmar3.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+        >
+            <!-- U+1017: "ဗ" MYANMAR LETTER BA -->
+            <Key
+                latin:keySpec="&#x1017;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103E: "ှ" MYANMAR CONSONANT SIGN MEDIAL HA -->
+            <Key
+                latin:keySpec="&#x103E;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102E: "ီ" MYANMAR VOWEL SIGN II -->
+            <Key
+                latin:keySpec="&#x102E;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1039: "္" MYANMAR SIGN VIRAMA -->
+            <Key
+                latin:keySpec="&#x1039;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103D: "ွ" MYANMAR CONSONANT SIGN MEDIAL WA -->
+            <Key
+                latin:keySpec="&#x103D;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1036: "ံ" MYANMAR SIGN ANUSVARA -->
+            <Key
+                latin:keySpec="&#x1036;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1032: "ဲ" MYANMAR VOWEL SIGN AI -->
+            <Key
+                latin:keySpec="&#x1032;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1012: "ဒ" MYANMAR LETTER DA -->
+            <Key
+                latin:keySpec="&#x1012;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1013: "ဓ" MYANMAR LETTER DHA -->
+            <Key
+                latin:keySpec="&#x1013;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1002: "ဂ" MYANMAR LETTER GA -->
+            <Key
+                latin:keySpec="&#x1002;"
+                latin:keyLabelFlags="fontNormal" />
+        </case>
+        <default>
+            <!-- U+1031: "ေ" MYANMAR VOWEL SIGN E -->
+            <Key
+                latin:keySpec="&#x1031;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103B: "ျ" MYANMAR CONSONANT SIGN MEDIAL YA -->
+            <Key
+                latin:keySpec="&#x103B;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102D: "ိ" MYANMAR VOWEL SIGN I -->
+            <Key
+                latin:keySpec="&#x102D;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103A: "်" MYANMAR SIGN ASAT -->
+            <Key
+                latin:keySpec="&#x103A;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102B: "ါ" MYANMAR VOWEL SIGN TALL AA -->
+            <Key
+                latin:keySpec="&#x102B;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1037: "့" MYANMAR SIGN DOT BELOW -->
+            <Key
+                latin:keySpec="&#x1037;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+103C: "ြ" MYANMAR CONSONANT SIGN MEDIAL RA -->
+            <Key
+                latin:keySpec="&#x103C;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102F: "ု" MYANMAR VOWEL SIGN U -->
+            <Key
+                latin:keySpec="&#x102F;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1030: "ူ" MYANMAR VOWEL SIGN UU -->
+            <Key
+                latin:keySpec="&#x1030;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1038: "း" MYANMAR SIGN VISARGA -->
+            <Key
+                latin:keySpec="&#x1038;"
+                latin:keyLabelFlags="fontNormal" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rowkeys_myanmar4.xml b/java/res/xml/rowkeys_myanmar4.xml
new file mode 100644
index 0000000..cfd1112
--- /dev/null
+++ b/java/res/xml/rowkeys_myanmar4.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+        >
+            <!-- U+1007: "ဇ" MYANMAR LETTER JA -->
+            <Key
+                latin:keySpec="&#x1007;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+100C: "ဌ" MYANMAR LETTER TTHA -->
+            <Key
+                latin:keySpec="&#x100C;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1003: "ဃ" MYANMAR LETTER GHA -->
+            <Key
+                latin:keySpec="&#x1003;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1020: "ဠ" MYANMAR LETTER LLA -->
+            <Key
+                latin:keySpec="&#x1020;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101A: "ယ" MYANMAR LETTER YA -->
+            <Key
+                latin:keySpec="&#x101A;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1009: "ဉ" MYANMAR LETTER NYA -->
+            <Key
+                latin:keySpec="&#x1009;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1026: "ဦ" MYANMAR LETTER UU -->
+            <Key
+                latin:keySpec="&#x1026;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102A: "ဪ" MYANMAR LETTER AU -->
+            <Key
+                latin:keySpec="&#x102A;"
+                latin:keyLabelFlags="fontNormal|autoXScale" />
+            <!-- U+1051: "ၑ" MYANMAR LETTER SSA -->
+            <Key
+                latin:keySpec="&#x1051;"
+                latin:keyLabelFlags="fontNormal" />
+        </case>
+        <default>
+            <!-- U+1016: "ဖ" MYANMAR LETTER PHA -->
+            <Key
+                latin:keySpec="&#x1016;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1011: "ထ" MYANMAR LETTER THA -->
+            <Key
+                latin:keySpec="&#x1011;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1001: "ခ" MYANMAR LETTER KHA -->
+            <Key
+                latin:keySpec="&#x1001;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+101C: "လ" MYANMAR LETTER LA -->
+            <Key
+                latin:keySpec="&#x101C;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1018: "ဘ" MYANMAR LETTER BHA -->
+            <Key
+                latin:keySpec="&#x1018;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+100A: "ည" MYANMAR LETTER NNYA -->
+            <Key
+                latin:keySpec="&#x100A;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+102C: "ာ" MYANMAR VOWEL SIGN AA -->
+            <Key
+                latin:keySpec="&#x102C;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+1029: "ဩ" MYANMAR LETTER O -->
+            <Key
+                latin:keySpec="&#x1029;"
+                latin:keyLabelFlags="fontNormal" />
+            <!-- U+104F: "၏" MYANMAR SYMBOL GENITIVE -->
+            <Key
+                latin:keySpec="&#x104F;"
+                latin:keyLabelFlags="fontNormal" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml/rows_myanmar.xml b/java/res/xml/rows_myanmar.xml
new file mode 100644
index 0000000..32c923d
--- /dev/null
+++ b/java/res/xml/rows_myanmar.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="9.0909%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar1" />
+    </Row>
+    <Row
+        latin:keyWidth="9.0909%p"
+    >
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar2" />
+    </Row>
+    <Row
+        latin:keyWidth="9.0909%p"
+    >
+        <include
+            latin:keyXPos="4.5454%p"
+            latin:keyboardLayout="@xml/rowkeys_myanmar3" />
+    </Row>
+    <Row
+        latin:keyWidth="9.0909%p"
+    >
+        <Key
+            latin:keyStyle="shiftKeyStyle" />
+        <include
+            latin:keyboardLayout="@xml/rowkeys_myanmar4" />
+        <Key
+            latin:keyStyle="deleteKeyStyle" />
+    </Row>
+    <include
+        latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/src/com/android/inputmethod/event/Event.java b/java/src/com/android/inputmethod/event/Event.java
index ed487e1..41bf36b 100644
--- a/java/src/com/android/inputmethod/event/Event.java
+++ b/java/src/com/android/inputmethod/event/Event.java
@@ -168,4 +168,8 @@
     public boolean isCommittable() {
         return EVENT_INPUT_KEYPRESS == mType || EVENT_MODE_KEY == mType || EVENT_TOGGLE == mType;
     }
+
+    public boolean isHandled() {
+        return EVENT_NOT_HANDLED != mType;
+    }
 }
diff --git a/java/src/com/android/inputmethod/event/EventInterpreter.java b/java/src/com/android/inputmethod/event/EventInterpreter.java
index 726b920..bcf10fc 100644
--- a/java/src/com/android/inputmethod/event/EventInterpreter.java
+++ b/java/src/com/android/inputmethod/event/EventInterpreter.java
@@ -16,11 +16,6 @@
 
 package com.android.inputmethod.event;
 
-import android.util.SparseArray;
-import android.view.KeyEvent;
-
-import com.android.inputmethod.latin.Constants;
-import com.android.inputmethod.latin.LatinIME;
 import com.android.inputmethod.latin.utils.CollectionUtils;
 
 import java.util.ArrayList;
@@ -37,25 +32,9 @@
     // TODO: Implement an object pool for events, as we'll create a lot of them
     // TODO: Create a combiner
     // TODO: Create an object type to represent input material + visual feedback + decoding state
-    // TODO: Create an interface to call back to Latin IME through the above object
 
-    final EventDecoderSpec mDecoderSpec;
-    final SparseArray<HardwareEventDecoder> mHardwareEventDecoders;
-    final SoftwareEventDecoder mSoftwareEventDecoder;
-    final LatinIME mLatinIme;
-    final ArrayList<Combiner> mCombiners;
-
-    /**
-     * Create a default interpreter.
-     *
-     * This creates a default interpreter that does nothing. A default interpreter should normally
-     * only be used for fallback purposes, when we really don't know what we want to do with input.
-     *
-     * @param latinIme a reference to the ime.
-     */
-    public EventInterpreter(final LatinIME latinIme) {
-        this(null, latinIme);
-    }
+    private final EventDecoderSpec mDecoderSpec;
+    private final ArrayList<Combiner> mCombiners;
 
     /**
      * Create an event interpreter according to a specification.
@@ -70,64 +49,10 @@
      * interpreter that does no specific combining, and assumes the most common cases.
      *
      * @param specification the specification for event interpretation. null for default.
-     * @param latinIme a reference to the ime.
      */
-    public EventInterpreter(final EventDecoderSpec specification, final LatinIME latinIme) {
+    public EventInterpreter(final EventDecoderSpec specification) {
         mDecoderSpec = null != specification ? specification : new EventDecoderSpec();
-        // For both, we expect to have only one decoder in almost all cases, hence the default
-        // capacity of 1.
-        mHardwareEventDecoders = new SparseArray<HardwareEventDecoder>(1);
-        mSoftwareEventDecoder = new SoftwareKeyboardEventDecoder();
         mCombiners = CollectionUtils.newArrayList();
         mCombiners.add(new DeadKeyCombiner());
-        mLatinIme = latinIme;
-    }
-
-    // Helper method to decode a hardware key event into a generic event, and execute any
-    // necessary action.
-    public boolean onHardwareKeyEvent(final KeyEvent hardwareKeyEvent) {
-        final Event decodedEvent = getHardwareKeyEventDecoder(hardwareKeyEvent.getDeviceId())
-                .decodeHardwareKey(hardwareKeyEvent);
-        return onEvent(decodedEvent);
-    }
-
-    public boolean onSoftwareEvent() {
-        final Event decodedEvent = getSoftwareEventDecoder().decodeSoftwareEvent();
-        return onEvent(decodedEvent);
-    }
-
-    private HardwareEventDecoder getHardwareKeyEventDecoder(final int deviceId) {
-        final HardwareEventDecoder decoder = mHardwareEventDecoders.get(deviceId);
-        if (null != decoder) return decoder;
-        // TODO: create the decoder according to the specification
-        final HardwareEventDecoder newDecoder = new HardwareKeyboardEventDecoder(deviceId);
-        mHardwareEventDecoders.put(deviceId, newDecoder);
-        return newDecoder;
-    }
-
-    private SoftwareEventDecoder getSoftwareEventDecoder() {
-        // Within the context of Latin IME, since we never present several software interfaces
-        // at the time, we should never need multiple software event decoders at a time.
-        return mSoftwareEventDecoder;
-    }
-
-    private boolean onEvent(final Event event) {
-        Event currentlyProcessingEvent = event;
-        boolean processed = false;
-        for (int i = 0; i < mCombiners.size(); ++i) {
-            currentlyProcessingEvent = mCombiners.get(i).combine(event);
-        }
-        while (null != currentlyProcessingEvent) {
-            if (currentlyProcessingEvent.isCommittable()) {
-                mLatinIme.onCodeInput(currentlyProcessingEvent.mCodePoint,
-                        Constants.EXTERNAL_KEYBOARD_COORDINATE,
-                        Constants.EXTERNAL_KEYBOARD_COORDINATE);
-                processed = true;
-            } else if (event.isDead()) {
-                processed = true;
-            }
-            currentlyProcessingEvent = currentlyProcessingEvent.mNextEvent;
-        }
-        return processed;
     }
 }
diff --git a/java/src/com/android/inputmethod/event/SoftwareEventDecoder.java b/java/src/com/android/inputmethod/event/SoftwareEventDecoder.java
deleted file mode 100644
index d81ee0b..0000000
--- a/java/src/com/android/inputmethod/event/SoftwareEventDecoder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.inputmethod.event;
-
-/**
- * An event decoder for events out of a software keyboard.
- *
- * This defines the interface for an event decoder that supports events out of a software keyboard.
- * This differs significantly from hardware keyboard event decoders in several respects. First,
- * a software keyboard does not have a scancode/layout system; the keypresses that insert
- * characters output unicode characters directly.
- */
-public interface SoftwareEventDecoder extends EventDecoder {
-    public Event decodeSoftwareEvent();
-}
diff --git a/java/src/com/android/inputmethod/event/SoftwareKeyboardEventDecoder.java b/java/src/com/android/inputmethod/event/SoftwareKeyboardEventDecoder.java
deleted file mode 100644
index de91567..0000000
--- a/java/src/com/android/inputmethod/event/SoftwareKeyboardEventDecoder.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.inputmethod.event;
-
-/**
- * A decoder for events from software keyboard, like the ones displayed by Latin IME.
- */
-public class SoftwareKeyboardEventDecoder implements SoftwareEventDecoder {
-    @Override
-    public Event decodeSoftwareEvent() {
-        return null;
-    }
-}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
index 7a0161e..e9ecd1e 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
@@ -87,9 +87,9 @@
         /*   5:23 */ "double_quotes",
         /*   6:22 */ "single_quotes",
         /*   7:21 */ "more_keys_for_c",
-        /*   8:20 */ "more_keys_for_s",
-        /*   9:20 */ "more_keys_for_n",
-        /*  10:20 */ "label_to_alpha_key",
+        /*   8:21 */ "label_to_alpha_key",
+        /*   9:20 */ "more_keys_for_s",
+        /*  10:20 */ "more_keys_for_n",
         /*  11:14 */ "more_keys_for_y",
         /*  12:13 */ "more_keys_for_d",
         /*  13:12 */ "more_keys_for_z",
@@ -260,13 +260,11 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_lqm_rqm",
         /* single_quotes */ "!text/single_lqm_rqm",
-        /* more_keys_for_c ~ */
-        EMPTY, EMPTY, EMPTY,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ EMPTY,
         // Label for "switch to alphabetic" key.
         /* label_to_alpha_key */ "ABC",
-        /* more_keys_for_y ~ */
-        EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+        /* more_keys_for_s ~ */
+        EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
         /* ~ more_keys_for_g */
         /* single_angle_quotes */ "!text/single_laqm_raqm",
         /* double_angle_quotes */ "!text/double_laqm_raqm",
@@ -508,12 +506,11 @@
         // U+0133: "ij" LATIN SMALL LIGATURE IJ
         /* more_keys_for_i */ "\u00ED,\u00EC,\u00EF,\u00EE,\u012F,\u012B,\u0133",
         /* double_quotes ~ */
-        null, null, null, null,
+        null, null, null, null, null,
         /* ~ more_keys_for_s */
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+0133: "ij" LATIN SMALL LIGATURE IJ
         /* more_keys_for_y */ "\u00FD,\u0133",
@@ -522,17 +519,17 @@
     /* Language ar: Arabic */
     private static final String[] LANGUAGE_ar = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0623: "أ" ARABIC LETTER ALEF WITH HAMZA ABOVE
         // U+200C: ZERO WIDTH NON-JOINER
         // U+0628: "ب" ARABIC LETTER BEH
         // U+062C: "ج" ARABIC LETTER JEEM
         /* label_to_alpha_key */ "\u0623\u200C\u0628\u200C\u062C",
-        /* more_keys_for_y ~ */
+        /* more_keys_for_s ~ */
         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,
         /* ~ more_keys_for_cyrillic_soft_sign */
         /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
         /* more_keys_for_nordic_row2_11 */ null,
@@ -686,13 +683,14 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         /* more_keys_for_s */ "\u015F,\u00DF,\u015B,\u0161",
         /* more_keys_for_n ~ */
-        null, null, null, null, null, null, null,
+        null, null, null, null, null, null,
         /* ~ more_keys_for_l */
         // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE
         /* more_keys_for_g */ "\u011F",
@@ -705,16 +703,14 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_k */
         // U+0451: "ё" CYRILLIC SMALL LETTER IO
         /* more_keys_for_cyrillic_ie */ "\u0451",
@@ -740,9 +736,8 @@
         /* ~ more_keys_for_i */
         // single_quotes of Bulgarian is default single_quotes_right_left.
         /* double_quotes */ "!text/double_9qm_lqm",
-        /* single_quotes ~ */
-        null, null, null, null,
-        /* ~ more_keys_for_n */
+        /* single_quotes */ null,
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
@@ -800,12 +795,13 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         /* more_keys_for_s */ null,
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key ~ */
-        null, null, null, null, null,
+        /* more_keys_for_y ~ */
+        null, null, null, null,
         /* ~ more_keys_for_t */
         // U+00B7: "·" MIDDLE DOT
         // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE
@@ -880,6 +876,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u00E7,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -888,7 +885,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u0148,\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -940,6 +936,7 @@
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
         /* more_keys_for_c */ null,
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
@@ -947,7 +944,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -1014,6 +1010,7 @@
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
         /* more_keys_for_c */ null,
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
@@ -1021,8 +1018,8 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key ~ */
-        null, null, null, null, null, null, null,
+        /* more_keys_for_y ~ */
+        null, null, null, null, null, null,
         /* ~ more_keys_for_g */
         /* single_angle_quotes */ "!text/single_raqm_laqm",
         /* double_angle_quotes */ "!text/double_raqm_laqm",
@@ -1050,8 +1047,8 @@
     /* Language el: Greek */
     private static final String[] LANGUAGE_el = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0391: "Α" GREEK CAPITAL LETTER ALPHA
         // U+0392: "Β" GREEK CAPITAL LETTER BETA
@@ -1101,6 +1098,7 @@
         /* single_quotes */ null,
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         /* more_keys_for_c */ "\u00E7",
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         /* more_keys_for_s */ "\u00DF",
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
@@ -1169,6 +1167,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE
         /* more_keys_for_c */ "\u0107,\u010D,\u00E7,\u010B",
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -1182,7 +1181,6 @@
         // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
         // U+014B: "ŋ" LATIN SMALL LETTER ENG
         /* more_keys_for_n */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
@@ -1309,13 +1307,14 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         /* more_keys_for_s */ null,
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key ~ */
+        /* more_keys_for_y ~ */
         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,
         /* ~ more_keys_for_cyrillic_soft_sign */
         // U+00A1: "¡" INVERTED EXCLAMATION MARK
         // U+00BF: "¿" INVERTED QUESTION MARK
@@ -1375,6 +1374,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u00E7,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -1384,7 +1384,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u0146,\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -1428,16 +1427,16 @@
     /* Language fa: Persian */
     private static final String[] LANGUAGE_fa = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0627: "ا" ARABIC LETTER ALEF
         // U+200C: ZERO WIDTH NON-JOINER
         // U+0628: "ب" ARABIC LETTER BEH
         // U+067E: "پ" ARABIC LETTER PEH
         /* label_to_alpha_key */ "\u0627\u200C\u0628\u200C\u067E",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+FDFC: "﷼" RIAL SIGN
         /* keylabel_for_currency */ "\uFDFC",
@@ -1591,14 +1590,14 @@
         // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
         /* more_keys_for_u */ "\u00FC",
         /* more_keys_for_e ~ */
-        null, null, null, null, null,
-        /* ~ more_keys_for_c */
+        null, null, null, null, null, null,
+        /* ~ label_to_alpha_key */
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         /* more_keys_for_s */ "\u0161,\u00DF,\u015B",
         /* more_keys_for_n ~ */
-        null, null, null, null,
+        null, null, null,
         /* ~ more_keys_for_d */
         // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
         // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
@@ -1671,9 +1670,9 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
-        /* more_keys_for_s ~ */
+        /* label_to_alpha_key ~ */
         null, null, null,
-        /* ~ label_to_alpha_key */
+        /* ~ more_keys_for_n */
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "%,\u00FF",
         /* more_keys_for_d ~ */
@@ -1700,15 +1699,15 @@
     /* Language hi: Hindi */
     private static final String[] LANGUAGE_hi = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0915: "क" DEVANAGARI LETTER KA
         // U+0916: "ख" DEVANAGARI LETTER KHA
         // U+0917: "ग" DEVANAGARI LETTER GA
         /* label_to_alpha_key */ "\u0915\u0916\u0917",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+20B9: "₹" INDIAN RUPEE SIGN
         /* keylabel_for_currency */ "\u20B9",
@@ -1763,6 +1762,7 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         /* more_keys_for_c */ "\u010D,\u0107,\u00E7",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
@@ -1770,7 +1770,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         /* more_keys_for_y */ null,
         // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE
         /* more_keys_for_d */ "\u0111",
@@ -1840,16 +1839,16 @@
     /* Language hy_AM: Armenian (Armenia) */
     private static final String[] LANGUAGE_hy_AM = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0531: "Ա" ARMENIAN CAPITAL LETTER AYB
         // U+0532: "Բ" ARMENIAN CAPITAL LETTER BEN
         // U+0533: "Գ" ARMENIAN CAPITAL LETTER GIM
         /* label_to_alpha_key */ "\u0531\u0532\u0533",
-        /* more_keys_for_y ~ */
+        /* more_keys_for_s ~ */
         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,
         /* ~ more_keys_for_cyrillic_soft_sign */
         // U+058A: "֊" ARMENIAN HYPHEN
         // U+055C: "՜" ARMENIAN EXCLAMATION MARK
@@ -1933,7 +1932,7 @@
         /* single_quotes */ "!text/single_9qm_lqm",
         /* more_keys_for_c ~ */
         null, null, null, null,
-        /* ~ label_to_alpha_key */
+        /* ~ more_keys_for_n */
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -1996,16 +1995,14 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_rqm_9qm",
         /* single_quotes */ "!text/single_rqm_9qm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+05D0: "א" HEBREW LETTER ALEF
         // U+05D1: "ב" HEBREW LETTER BET
         // U+05D2: "ג" HEBREW LETTER GIMEL
         /* label_to_alpha_key */ "\u05D0\u05D1\u05D2",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+20AA: "₪" NEW SHEQEL SIGN
         /* keylabel_for_currency */ "\u20AA",
@@ -2055,9 +2052,7 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+10D0: "ა" GEORGIAN LETTER AN
         // U+10D1: "ბ" GEORGIAN LETTER BAN
@@ -2068,15 +2063,15 @@
     /* Language kk: Kazakh */
     private static final String[] LANGUAGE_kk = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_k */
         // U+0451: "ё" CYRILLIC SMALL LETTER IO
         /* more_keys_for_cyrillic_ie */ "\u0451",
@@ -2124,21 +2119,21 @@
     /* Language km_KH: Khmer (Cambodia) */
     private static final String[] LANGUAGE_km_KH = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+1780: "ក" KHMER LETTER KA
         // U+1781: "ខ" KHMER LETTER KHA
         // U+1782: "គ" KHMER LETTER KO
         /* label_to_alpha_key */ "\u1780\u1781\u1782",
-        /* more_keys_for_y ~ */
+        /* more_keys_for_s ~ */
         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, 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,
         /* ~ more_keys_for_east_slavic_row2_11 */
         // U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL
         /* more_keys_for_currency_dollar */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
@@ -2147,15 +2142,15 @@
     /* Language ky: Kirghiz */
     private static final String[] LANGUAGE_ky = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_k */
         // U+0451: "ё" CYRILLIC SMALL LETTER IO
         /* more_keys_for_cyrillic_ie */ "\u0451",
@@ -2190,15 +2185,15 @@
     /* Language lo_LA: Lao (Laos) */
     private static final String[] LANGUAGE_lo_LA = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0E81: "ກ" LAO LETTER KO
         // U+0E82: "ຂ" LAO LETTER KHO SUNG
         // U+0E84: "ຄ" LAO LETTER KHO TAM
         /* label_to_alpha_key */ "\u0E81\u0E82\u0E84",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+20AD: "₭" KIP SIGN
         /* keylabel_for_currency */ "\u20AD",
@@ -2258,6 +2253,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u00E7,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -2267,7 +2263,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u0146,\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -2352,6 +2347,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u00E7,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -2361,7 +2357,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u0146,\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -2400,16 +2395,14 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_k */
         // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE
         /* more_keys_for_cyrillic_ie */ "\u0450",
@@ -2434,20 +2427,32 @@
     /* Language mn_MN: Mongolian (Mongolia) */
     private static final String[] LANGUAGE_mn_MN = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+20AE: "₮" TUGRIK SIGN
         /* keylabel_for_currency */ "\u20AE",
     };
 
+    /* Language my_MM: Burmese (Myanmar) */
+    private static final String[] LANGUAGE_my_MM = {
+        /* more_keys_for_a ~ */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
+        // Label for "switch to alphabetic" key.
+        // U+1000: "က" MYANMAR LETTER KA
+        // U+1001: "ခ" MYANMAR LETTER KHA
+        // U+1002: "ဂ" MYANMAR LETTER GA
+        /* label_to_alpha_key */ "\u1000\u1001\u1002",
+    };
+
     /* Language nb: Norwegian Bokmål */
     private static final String[] LANGUAGE_nb = {
         // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
@@ -2504,15 +2509,15 @@
     /* Language ne_NP: Nepali (Nepal) */
     private static final String[] LANGUAGE_ne_NP = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0915: "क" DEVANAGARI LETTER KA
         // U+0916: "ख" DEVANAGARI LETTER KHA
         // U+0917: "ग" DEVANAGARI LETTER GA
         /* label_to_alpha_key */ "\u0915\u0916\u0917",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
         /* keylabel_for_currency */ "\u0930\u0941.",
@@ -2600,12 +2605,12 @@
         /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B,\u0133",
         /* double_quotes */ "!text/double_9qm_rqm",
         /* single_quotes */ "!text/single_9qm_rqm",
-        /* more_keys_for_c */ null,
-        /* more_keys_for_s */ null,
+        /* more_keys_for_c ~ */
+        null, null, null,
+        /* ~ more_keys_for_s */
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+0133: "ij" LATIN SMALL LIGATURE IJ
         /* more_keys_for_y */ "\u0133",
     };
@@ -2647,6 +2652,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u0107,\u00E7,\u010D",
+        /* label_to_alpha_key */ null,
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
@@ -2654,9 +2660,8 @@
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         /* more_keys_for_n */ "\u0144,\u00F1",
-        /* label_to_alpha_key ~ */
-        null, null, null,
-        /* ~ more_keys_for_d */
+        /* more_keys_for_y */ null,
+        /* more_keys_for_d */ null,
         // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
         // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
         // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
@@ -2754,13 +2759,14 @@
         /* double_quotes */ "!text/double_9qm_rqm",
         /* single_quotes */ "!text/single_9qm_rqm",
         /* more_keys_for_c */ null,
+        /* label_to_alpha_key */ null,
         // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         /* more_keys_for_s */ "\u0219,\u00DF,\u015B,\u0161",
         /* more_keys_for_n ~ */
-        null, null, null, null, null,
+        null, null, null, null,
         /* ~ more_keys_for_z */
         // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW
         /* more_keys_for_t */ "\u021B",
@@ -2773,16 +2779,14 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_k */
         // U+0451: "ё" CYRILLIC SMALL LETTER IO
         /* more_keys_for_cyrillic_ie */ "\u0451",
@@ -2854,6 +2858,7 @@
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u00E7,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
@@ -2864,7 +2869,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
         /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -2906,11 +2910,11 @@
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         /* more_keys_for_c */ "\u010D,\u0107",
+        /* label_to_alpha_key */ null,
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         /* more_keys_for_s */ "\u0161",
-        /* more_keys_for_n ~ */
-        null, null, null,
-        /* ~ more_keys_for_y */
+        /* more_keys_for_n */ null,
+        /* more_keys_for_y */ null,
         // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE
         /* more_keys_for_d */ "\u0111",
         // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON
@@ -2929,17 +2933,15 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // END: More keys definitions for Serbian (Cyrillic)
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null,
         /* ~ more_keys_for_g */
         /* single_angle_quotes */ "!text/single_raqm_laqm",
         /* double_angle_quotes */ "!text/double_raqm_laqm",
@@ -3021,6 +3023,7 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
@@ -3030,7 +3033,6 @@
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0148: "ň" LATIN SMALL LETTER N WITH CARON
         /* more_keys_for_n */ "\u0144,\u00F1,\u0148",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
         /* more_keys_for_y */ "\u00FD,\u00FF",
@@ -3113,12 +3115,13 @@
         /* single_quotes */ null,
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         /* more_keys_for_c */ "\u00E7",
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         /* more_keys_for_s */ "\u00DF",
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         /* more_keys_for_n */ "\u00F1",
-        /* label_to_alpha_key ~ */
-        null, null, null, null, null, null,
+        /* more_keys_for_y ~ */
+        null, null, null, null, null,
         /* ~ more_keys_for_l */
         /* more_keys_for_g */ "g\'",
     };
@@ -3126,15 +3129,15 @@
     /* Language th: Thai */
     private static final String[] LANGUAGE_th = {
         /* more_keys_for_a ~ */
-        null, null, null, null, null, null, null, null, null, null,
-        /* ~ more_keys_for_n */
+        null, null, null, null, null, null, null, null,
+        /* ~ more_keys_for_c */
         // Label for "switch to alphabetic" key.
         // U+0E01: "ก" THAI CHARACTER KO KAI
         // U+0E02: "ข" THAI CHARACTER KHO KHAI
         // U+0E04: "ค" THAI CHARACTER KHO KHWAI
         /* label_to_alpha_key */ "\u0E01\u0E02\u0E04",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT
         /* keylabel_for_currency */ "\u0E3F",
@@ -3190,6 +3193,7 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         /* more_keys_for_s */ null,
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
         // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
@@ -3230,13 +3234,14 @@
         // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u010D",
+        /* label_to_alpha_key */ null,
         // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+0161: "š" LATIN SMALL LETTER S WITH CARON
         /* more_keys_for_s */ "\u015F,\u00DF,\u015B,\u0161",
         /* more_keys_for_n ~ */
-        null, null, null, null, null, null, null,
+        null, null, null, null, null, null,
         /* ~ more_keys_for_l */
         // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE
         /* more_keys_for_g */ "\u011F",
@@ -3249,16 +3254,14 @@
         /* ~ more_keys_for_i */
         /* double_quotes */ "!text/double_9qm_lqm",
         /* single_quotes */ "!text/single_9qm_lqm",
-        /* more_keys_for_c ~ */
-        null, null, null,
-        /* ~ more_keys_for_n */
+        /* more_keys_for_c */ null,
         // Label for "switch to alphabetic" key.
         // U+0410: "А" CYRILLIC CAPITAL LETTER A
         // U+0411: "Б" CYRILLIC CAPITAL LETTER BE
         // U+0412: "В" CYRILLIC CAPITAL LETTER VE
         /* label_to_alpha_key */ "\u0410\u0411\u0412",
-        /* more_keys_for_y ~ */
-        null, null, null, null, null, null, null, null,
+        /* more_keys_for_s ~ */
+        null, null, null, null, null, null, null, null, null, null,
         /* ~ double_angle_quotes */
         // U+20B4: "₴" HRYVNIA SIGN
         /* keylabel_for_currency */ "\u20B4",
@@ -3357,7 +3360,7 @@
         /* more_keys_for_i */ "\u00EC,\u00ED,\u1EC9,\u0129,\u1ECB",
         /* double_quotes ~ */
         null, null, null, null, null, null,
-        /* ~ label_to_alpha_key */
+        /* ~ more_keys_for_n */
         // U+1EF3: "ỳ" LATIN SMALL LETTER Y WITH GRAVE
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+1EF7: "ỷ" LATIN SMALL LETTER Y WITH HOOK ABOVE
@@ -3416,6 +3419,7 @@
         /* single_quotes */ null,
         // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
         /* more_keys_for_c */ "\u00E7",
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         /* more_keys_for_s */ "\u00DF",
         // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
@@ -3488,6 +3492,7 @@
         // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE
         // U+010D: "č" LATIN SMALL LETTER C WITH CARON
         /* more_keys_for_c */ "\u00E7,\u0107,\u0109,\u010B,\u010D",
+        /* label_to_alpha_key */ null,
         // U+00DF: "ß" LATIN SMALL LETTER SHARP S
         // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
         // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX
@@ -3502,7 +3507,6 @@
         // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
         // U+014B: "ŋ" LATIN SMALL LETTER ENG
         /* more_keys_for_n */ "\u00F1,\u0144,\u0146,\u0148,\u0149,\u014B",
-        /* label_to_alpha_key */ null,
         // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
         // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX
         // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
@@ -3570,13 +3574,13 @@
         "ar", LANGUAGE_ar,    /*  58/109 Arabic */
         "az", LANGUAGE_az_AZ, /*   8/ 17 Azerbaijani (Azerbaijan) */
         "be", LANGUAGE_be_BY, /*   9/ 32 Belarusian (Belarus) */
-        "bg", LANGUAGE_bg,    /*   2/ 11 Bulgarian */
+        "bg", LANGUAGE_bg,    /*   2/  9 Bulgarian */
         "ca", LANGUAGE_ca,    /*  11/116 Catalan */
         "cs", LANGUAGE_cs,    /*  17/ 21 Czech */
         "da", LANGUAGE_da,    /*  19/ 34 Danish */
         "de", LANGUAGE_de,    /*  16/ 92 German */
-        "el", LANGUAGE_el,    /*   1/ 11 Greek */
-        "en", LANGUAGE_en,    /*   8/ 10 English */
+        "el", LANGUAGE_el,    /*   1/  9 Greek */
+        "en", LANGUAGE_en,    /*   8/ 11 English */
         "eo", LANGUAGE_eo,    /*  26/128 Esperanto */
         "es", LANGUAGE_es,    /*   8/ 33 Spanish */
         "et", LANGUAGE_et_EE, /*  22/ 27 Estonian (Estonia) */
@@ -3590,7 +3594,7 @@
         "is", LANGUAGE_is,    /*  10/ 15 Icelandic */
         "it", LANGUAGE_it,    /*   5/  5 Italian */
         "iw", LANGUAGE_iw,    /*  20/117 Hebrew */
-        "ka", LANGUAGE_ka_GE, /*   3/ 11 Georgian (Georgia) */
+        "ka", LANGUAGE_ka_GE, /*   3/  9 Georgian (Georgia) */
         "kk", LANGUAGE_kk,    /*  15/114 Kazakh */
         "km", LANGUAGE_km_KH, /*   2/115 Khmer (Cambodia) */
         "ky", LANGUAGE_ky,    /*  10/ 81 Kirghiz */
@@ -3599,6 +3603,7 @@
         "lv", LANGUAGE_lv,    /*  18/ 22 Latvian */
         "mk", LANGUAGE_mk,    /*   9/ 86 Macedonian */
         "mn", LANGUAGE_mn_MN, /*   2/ 20 Mongolian (Mongolia) */
+        "my", LANGUAGE_my_MM, /*   1/  9 Burmese (Myanmar) */
         "nb", LANGUAGE_nb,    /*  11/ 34 Norwegian Bokmål */
         "ne", LANGUAGE_ne_NP, /*  24/ 56 Nepali (Nepal) */
         "nl", LANGUAGE_nl,    /*   9/ 12 Dutch */
@@ -3613,11 +3618,11 @@
         "sv", LANGUAGE_sv,    /*  21/ 34 Swedish */
         "sw", LANGUAGE_sw,    /*   9/ 17 Swahili */
         "th", LANGUAGE_th,    /*   2/ 20 Thai */
-        "tl", LANGUAGE_tl,    /*   7/ 10 Tagalog */
+        "tl", LANGUAGE_tl,    /*   7/ 11 Tagalog */
         "tr", LANGUAGE_tr,    /*   7/ 17 Turkish */
         "uk", LANGUAGE_uk,    /*  11/ 80 Ukrainian */
         "vi", LANGUAGE_vi,    /*   8/ 20 Vietnamese */
-        "zu", LANGUAGE_zu,    /*   8/ 10 Zulu */
+        "zu", LANGUAGE_zu,    /*   8/ 11 Zulu */
         "zz", LANGUAGE_zz,    /*  19/111 Alphabet */
     };
 
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 222e735..4a18c2b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -45,6 +45,7 @@
 import android.util.Log;
 import android.util.PrintWriterPrinter;
 import android.util.Printer;
+import android.util.SparseArray;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup.LayoutParams;
@@ -60,6 +61,8 @@
 import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
 import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
 import com.android.inputmethod.event.Event;
+import com.android.inputmethod.event.HardwareEventDecoder;
+import com.android.inputmethod.event.HardwareKeyboardEventDecoder;
 import com.android.inputmethod.event.InputTransaction;
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.KeyboardActionListener;
@@ -120,6 +123,10 @@
     private final Settings mSettings;
     private final InputLogic mInputLogic = new InputLogic(this /* LatinIME */,
             this /* SuggestionStripViewAccessor */);
+    // We expect to have only one decoder in almost all cases, hence the default capacity of 1.
+    // If it turns out we need several, it will get grown seamlessly.
+    final SparseArray<HardwareEventDecoder> mHardwareEventDecoders
+            = new SparseArray<HardwareEventDecoder>(1);
 
     private View mExtractArea;
     private View mKeyPreviewBackingView;
@@ -643,9 +650,7 @@
         if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
             ResearchLogger.getInstance().initDictionary(newSuggest.mDictionaryFacilitator);
         }
-        final Suggest oldSuggest = mInputLogic.mSuggest;
-        mInputLogic.mSuggest = newSuggest;
-        if (oldSuggest != null) oldSuggest.close();
+        mInputLogic.replaceSuggest(newSuggest);
         refreshPersonalizationDictionarySession();
     }
 
@@ -1588,19 +1593,31 @@
         }
     }
 
+    private HardwareEventDecoder getHardwareKeyEventDecoder(final int deviceId) {
+        final HardwareEventDecoder decoder = mHardwareEventDecoders.get(deviceId);
+        if (null != decoder) return decoder;
+        // TODO: create the decoder according to the specification
+        final HardwareEventDecoder newDecoder = new HardwareKeyboardEventDecoder(deviceId);
+        mHardwareEventDecoders.put(deviceId, newDecoder);
+        return newDecoder;
+    }
+
     // Hooks for hardware keyboard
     @Override
-    public boolean onKeyDown(final int keyCode, final KeyEvent event) {
-        if (!ProductionFlag.IS_HARDWARE_KEYBOARD_SUPPORTED) return super.onKeyDown(keyCode, event);
-        // onHardwareKeyEvent, like onKeyDown returns true if it handled the event, false if
-        // it doesn't know what to do with it and leave it to the application. For example,
-        // hardware key events for adjusting the screen's brightness are passed as is.
-        if (mInputLogic.mEventInterpreter.onHardwareKeyEvent(event)) {
-            final long keyIdentifier = event.getDeviceId() << 32 + event.getKeyCode();
-            mInputLogic.mCurrentlyPressedHardwareKeys.add(keyIdentifier);
+    public boolean onKeyDown(final int keyCode, final KeyEvent keyEvent) {
+        if (!ProductionFlag.IS_HARDWARE_KEYBOARD_SUPPORTED) {
+            return super.onKeyDown(keyCode, keyEvent);
+        }
+        final Event event = getHardwareKeyEventDecoder(
+                keyEvent.getDeviceId()).decodeHardwareKey(keyEvent);
+        // If the event is not handled by LatinIME, we just pass it to the parent implementation.
+        // If it's handled, we return true because we did handle it.
+        if (event.isHandled()) {
+            mInputLogic.onCodeInput(mSettings.getCurrent(), event,
+                    mKeyboardSwitcher.getKeyboardShiftMode(), mHandler);
             return true;
         }
-        return super.onKeyDown(keyCode, event);
+        return super.onKeyDown(keyCode, keyEvent);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index cb55aa0..fa7c4b4 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -80,8 +80,6 @@
     public SuggestedWords mSuggestedWords = SuggestedWords.EMPTY;
     // TODO: mSuggest should be touched by a single thread.
     public volatile Suggest mSuggest;
-    // The event interpreter should never be null.
-    public final EventInterpreter mEventInterpreter;
 
     public LastComposedWord mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD;
     public final WordComposer mWordComposer;
@@ -104,11 +102,19 @@
         mLatinIME = latinIME;
         mSuggestionStripViewAccessor = suggestionStripViewAccessor;
         mWordComposer = new WordComposer();
-        mEventInterpreter = new EventInterpreter(latinIME);
         mConnection = new RichInputConnection(latinIME);
         mInputLogicHandler = InputLogicHandler.NULL_HANDLER;
     }
 
+    // Replace the old Suggest with the passed Suggest and close it.
+    public void replaceSuggest(final Suggest newSuggest) {
+        final Suggest oldSuggest = mSuggest;
+        mSuggest = newSuggest;
+        if (oldSuggest != null) {
+            oldSuggest.close();
+        }
+    }
+
     /**
      * Initializes the input logic for input in an editor.
      *
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 4c57af0..4e6ff95 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -344,10 +344,6 @@
 #define MAX_POINTER_COUNT 1
 #define MAX_POINTER_COUNT_G 2
 
-// DEBUG
-#define INPUTLENGTH_FOR_DEBUG (-1)
-#define MIN_OUTPUT_INDEX_FOR_DEBUG (-1)
-
 #define DISALLOW_DEFAULT_CONSTRUCTOR(TypeName) \
   TypeName() = delete
 
diff --git a/native/jni/src/suggest/policyimpl/typing/typing_scoring.h b/native/jni/src/suggest/policyimpl/typing/typing_scoring.h
index 7ef905d..8982800 100644
--- a/native/jni/src/suggest/policyimpl/typing/typing_scoring.h
+++ b/native/jni/src/suggest/policyimpl/typing/typing_scoring.h
@@ -32,25 +32,24 @@
  public:
     static const TypingScoring *getInstance() { return &sInstance; }
 
-    AK_FORCE_INLINE bool getMostProbableString(
-            const DicTraverseSession *const traverseSession, const int terminalSize,
-            const float languageWeight, int *const outputCodePoints, int *const type,
-            int *const freq) const {
+    AK_FORCE_INLINE bool getMostProbableString(const DicTraverseSession *const traverseSession,
+            const int terminalSize, const float languageWeight, int *const outputCodePoints,
+            int *const type, int *const freq) const {
         return false;
     }
 
-    AK_FORCE_INLINE void safetyNetForMostProbableString(const int scoreCount,
-            const int maxScore, int *const outputCodePoints, int *const scores) const {
+    AK_FORCE_INLINE void safetyNetForMostProbableString(const int scoreCount, const int maxScore,
+            int *const outputCodePoints, int *const scores) const {
     }
 
     AK_FORCE_INLINE float getAdjustedLanguageWeight(DicTraverseSession *const traverseSession,
-             DicNode *const terminals, const int size) const {
+            DicNode *const terminals, const int size) const {
         return 1.0f;
     }
 
-    AK_FORCE_INLINE int calculateFinalScore(const float compoundDistance,
-            const int inputSize, const ErrorTypeUtils::ErrorType containedErrorTypes,
-            const bool forceCommit, const bool boostExactMatches) const {
+    AK_FORCE_INLINE int calculateFinalScore(const float compoundDistance, const int inputSize,
+            const ErrorTypeUtils::ErrorType containedErrorTypes, const bool forceCommit,
+            const bool boostExactMatches) const {
         const float maxDistance = ScoringParams::DISTANCE_WEIGHT_LANGUAGE
                 + static_cast<float>(inputSize) * ScoringParams::TYPING_MAX_OUTPUT_SCORE_PER_INPUT;
         float score = ScoringParams::TYPING_BASE_OUTPUT_SCORE - compoundDistance / maxDistance;
@@ -85,8 +84,8 @@
         return true;
     }
 
-    AK_FORCE_INLINE bool sameAsTyped(
-            const DicTraverseSession *const traverseSession, const DicNode *const dicNode) const {
+    AK_FORCE_INLINE bool sameAsTyped(const DicTraverseSession *const traverseSession,
+            const DicNode *const dicNode) const {
         return traverseSession->getProximityInfoState(0)->sameAsTyped(
                 dicNode->getOutputWordBuf(), dicNode->getNodeCodePointCount());
     }
diff --git a/native/jni/src/suggest/policyimpl/typing/typing_weighting.h b/native/jni/src/suggest/policyimpl/typing/typing_weighting.h
index 41314ef..b36605a 100644
--- a/native/jni/src/suggest/policyimpl/typing/typing_weighting.h
+++ b/native/jni/src/suggest/policyimpl/typing/typing_weighting.h
@@ -72,8 +72,6 @@
     float getMatchedCost(const DicTraverseSession *const traverseSession,
             const DicNode *const dicNode, DicNode_InputStateG *inputStateG) const {
         const int pointIndex = dicNode->getInputIndex(0);
-        // Note: min() required since length can be MAX_POINT_TO_KEY_LENGTH for characters not on
-        // the keyboard (like accented letters)
         const float normalizedSquaredLength = traverseSession->getProximityInfoState(0)
                 ->getPointToKeyLength(pointIndex,
                         CharUtils::toBaseLowerCase(dicNode->getNodeCodePoint()));
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
new file mode 100644
index 0000000..a5befab
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout;
+
+import com.android.inputmethod.keyboard.layout.Symbols.RtlSymbols;
+import com.android.inputmethod.keyboard.layout.SymbolsShifted.RtlSymbolsShifted;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+import com.android.inputmethod.latin.Constants;
+
+import java.util.Locale;
+
+public final class Hebrew extends LayoutBase {
+    private static final String LAYOUT_NAME = "hebrew";
+
+    public Hebrew(final LayoutCustomizer customizer) {
+        super(customizer, HebrewSymbols.class, RtlSymbolsShifted.class);
+    }
+
+    @Override
+    public String getName() { return LAYOUT_NAME; }
+
+    public static class HebrewCustomizer extends LayoutCustomizer {
+        public HebrewCustomizer(final Locale locale) {
+            super(locale);
+        }
+
+        @Override
+        public ExpectedKey getAlphabetKey() { return HEBREW_ALPHABET_KEY; }
+
+        @Override
+        public ExpectedKey getCurrencyKey() { return CURRENCY_NEW_SHEQEL; }
+
+        @Override
+        public ExpectedKey[] getOtherCurrencyKeys() {
+            return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
+        }
+
+        @Override
+        public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_LR9; }
+
+        @Override
+        public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_LR9; }
+
+        @Override
+        public ExpectedKey[] getDoubleAngleQuoteKeys() {
+            return RtlSymbols.DOUBLE_ANGLE_QUOTES_LR_RTL;
+        }
+
+        @Override
+        public ExpectedKey[] getSingleAngleQuoteKeys() {
+            return RtlSymbols.SINGLE_ANGLE_QUOTES_LR_RTL;
+        }
+
+        @Override
+        public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+            return EMPTY_KEYS;
+        }
+
+        @Override
+        public ExpectedKey[] getRightShiftKeys(final boolean isPhone) {
+            return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS;
+        }
+
+        @Override
+        public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) {
+            return isPhone ? RTL_PHONE_PUNCTUATION_MORE_KEYS
+                    : RTL_TABLET_PUNCTUATION_MORE_KEYS;
+        }
+
+        // U+05D0: "א" HEBREW LETTER ALEF
+        // U+05D1: "ב" HEBREW LETTER BET
+        // U+05D2: "ג" HEBREW LETTER GIMEL
+        private static final ExpectedKey HEBREW_ALPHABET_KEY = key(
+                "\u05D0\u05D1\u05D2", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+        // U+20AA: "₪" NEW SHEQEL SIGN
+        private static final ExpectedKey CURRENCY_NEW_SHEQEL = key("\u20AA",
+                Symbols.CURRENCY_GENERIC_MORE_KEYS);
+        private static final ExpectedKey[] RTL_PHONE_PUNCTUATION_MORE_KEYS = joinKeys(
+                ";", "/", key("(", ")"), key(")", "("), "#", "!", ",", "?",
+                "&", "%", "+", "\"", "-", ":", "'", "@");
+        // Punctuation more keys for tablet form factor.
+        private static final ExpectedKey[] RTL_TABLET_PUNCTUATION_MORE_KEYS = joinKeys(
+                ";", "/", key("(", ")"), key(")", "("), "#", "'", ",",
+                "&", "%", "+", "\"", "-", ":", "@");
+    }
+
+    @Override
+    ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
+
+    @Override
+    ExpectedKey[][] getCommonAlphabetShiftLayout(final boolean isPhone, final int elementId) {
+        return null;
+    }
+
+    private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
+            .setKeysOfRow(1,
+                    key("'", joinMoreKeys("1", "\"")),
+                    key("-", joinMoreKeys("2", "_")),
+                    // U+05E7: "ק" HEBREW LETTER QOF
+                    key("\u05E7", moreKey("3")),
+                    // U+05E8: "ר" HEBREW LETTER RESH
+                    key("\u05E8", moreKey("4")),
+                    // U+05D0: "א" HEBREW LETTER ALEF
+                    key("\u05D0", moreKey("5")),
+                    // U+05D8: "ט" HEBREW LETTER TET
+                    key("\u05D8", moreKey("6")),
+                    // U+05D5: "ו" HEBREW LETTER VAV
+                    key("\u05D5", moreKey("7")),
+                    // U+05DF: "ן" HEBREW LETTER FINAL NUN
+                    key("\u05DF", moreKey("8")),
+                    // U+05DD: "ם" HEBREW LETTER FINAL MEM
+                    key("\u05DD", moreKey("9")),
+                    // U+05E4: "פ" HEBREW LETTER PE
+                    key("\u05E4", moreKey("0")))
+            .setKeysOfRow(2,
+                    // U+05E9: "ש" HEBREW LETTER SHIN
+                    key("\u05E9"),
+                    // U+05D3: "ד" HEBREW LETTER DALET
+                    key("\u05D3"),
+                    // U+05D2: "ג" HEBREW LETTER GIMEL
+                    // U+05D2 U+05F3: "ג׳" HEBREW LETTER GIMEL + HEBREW PUNCTUATION GERESH
+                    key("\u05D2", moreKey("\u05D2\u05F3")),
+                    // U+05DB: "כ" HEBREW LETTER KAF
+                    key("\u05DB"),
+                    // U+05E2: "ע" HEBREW LETTER AYIN
+                    key("\u05E2"),
+                    // U+05D9: "י" HEBREW LETTER YOD
+                    // U+05F2 U+05B7: "ײַ" HEBREW LIGATURE YIDDISH DOUBLE YOD + HEBREW POINT PATAH
+                    key("\u05D9", moreKey("\u05F2\u05B7")),
+                    // U+05D7: "ח" HEBREW LETTER HET
+                    // U+05D7 U+05F3: "ח׳" HEBREW LETTER HET + HEBREW PUNCTUATION GERESH
+                    key("\u05D7", moreKey("\u05D7\u05F3")),
+                    // U+05DC: "ל" HEBREW LETTER LAMED
+                    key("\u05DC"),
+                    // U+05DA: "ך" HEBREW LETTER FINAL KAF
+                    key("\u05DA"),
+                    // U+05E3: "ף" HEBREW LETTER FINAL PE
+                    key("\u05E3"))
+            .setKeysOfRow(3,
+                    // U+05D6: "ז" HEBREW LETTER ZAYIN
+                    // U+05D6 U+05F3: "ז׳" HEBREW LETTER ZAYIN + HEBREW PUNCTUATION GERESH
+                    key("\u05D6", moreKey("\u05D6\u05F3")),
+                    // U+05E1: "ס" HEBREW LETTER SAMEKH
+                    key("\u05E1"),
+                    // U+05D1: "ב" HEBREW LETTER BET
+                    key("\u05D1"),
+                    // U+05D4: "ה" HEBREW LETTER HE
+                    key("\u05D4"),
+                    // U+05E0: "נ" HEBREW LETTER NUN
+                    key("\u05E0"),
+                    // U+05DE: "מ" HEBREW LETTER MEM
+                    key("\u05DE"),
+                    // U+05E6: "צ" HEBREW LETTER TSADI
+                    // U+05E6 U+05F3: "צ׳" HEBREW LETTER TSADI + HEBREW PUNCTUATION GERESH
+                    key("\u05E6", moreKey("\u05E6\u05F3")),
+                    // U+05EA: "ת" HEBREW LETTER TAV
+                    // U+05EA U+05F3: "ת׳" HEBREW LETTER TAV + HEBREW PUNCTUATION GERESH
+                    key("\u05EA", moreKey("\u05EA\u05F3")),
+                    // U+05E5: "ץ" HEBREW LETTER FINAL TSADI
+                    // U+05E5 U+05F3: "ץ׳" HEBREW LETTER FINAL TSADI + HEBREW PUNCTUATION GERESH
+                    key("\u05E5", moreKey("\u05E5\u05F3")))
+            .build();
+
+    private static class HebrewSymbols extends RtlSymbols {
+        public HebrewSymbols(final LayoutCustomizer customizer) {
+            super(customizer);
+        }
+
+        @Override
+        public ExpectedKey[][] getLayout(final boolean isPhone) {
+            return new ExpectedKeyboardBuilder(super.getLayout(isPhone))
+                    // U+00B1: "±" PLUS-MINUS SIGN
+                    // U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN
+                    .setMoreKeysOf("+", "\u00B1", "\uFB29")
+                    // U+2605: "★" BLACK STAR
+                    .setMoreKeysOf("*", "\u2605")
+                    .build();
+        }
+    }
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java
new file mode 100644
index 0000000..c0243a8
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHebrew.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.Hebrew;
+import com.android.inputmethod.keyboard.layout.Hebrew.HebrewCustomizer;
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+
+import java.util.Locale;
+
+/**
+ * iw: Hebrew/hebrew
+ */
+@SmallTest
+public class TestsHebrew extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("iw");
+    private static final LayoutBase LAYOUT = new Hebrew(new HebrewCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+}
diff --git a/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml
new file mode 100644
index 0000000..16a0bc4
--- /dev/null
+++ b/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Label for "switch to alphabetic" key.
+         U+1000: "က" MYANMAR LETTER KA
+         U+1001: "ခ" MYANMAR LETTER KHA
+         U+1002: "ဂ" MYANMAR LETTER GA -->
+    <string name="label_to_alpha_key">&#x1000;&#x1001;&#x1002;</string>
+</resources>