aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/res/values-am/strings.xml4
-rw-r--r--java/res/xml-sw600dp/rows_myanmar.xml73
-rw-r--r--java/res/xml/kbd_myanmar.xml31
-rw-r--r--java/res/xml/keyboard_layout_set_myanmar.xml58
-rw-r--r--java/res/xml/method.xml11
-rw-r--r--java/res/xml/rowkeys_myanmar1.xml134
-rw-r--r--java/res/xml/rowkeys_myanmar2.xml120
-rw-r--r--java/res/xml/rowkeys_myanmar3.xml112
-rw-r--r--java/res/xml/rowkeys_myanmar4.xml104
-rw-r--r--java/res/xml/rows_myanmar.xml57
-rw-r--r--java/src/com/android/inputmethod/event/Event.java4
-rw-r--r--java/src/com/android/inputmethod/event/EventInterpreter.java81
-rw-r--r--java/src/com/android/inputmethod/event/SoftwareEventDecoder.java29
-rw-r--r--java/src/com/android/inputmethod/event/SoftwareKeyboardEventDecoder.java27
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java4
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java275
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java41
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java12
-rw-r--r--java/src/com/android/inputmethod/latin/settings/Settings.java32
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsValues.java2
-rw-r--r--native/jni/Android.mk8
-rw-r--r--tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java2
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Arabic.java14
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Azerty.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Farsi.java19
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Georgian.java32
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Greek.java17
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java16
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Hindi.java35
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Khmer.java79
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Lao.java45
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java17
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java34
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java121
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java100
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Nordic.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java4
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java4
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java40
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Spanish.java4
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Swiss.java6
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Symbols.java9
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java24
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/Thai.java102
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java18
-rw-r--r--tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java102
-rw-r--r--tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml26
50 files changed, 1289 insertions, 830 deletions
diff --git a/java/res/values-am/strings.xml b/java/res/values-am/strings.xml
index 6d4c5bf88..13fe7f83f 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 000000000..778b330af
--- /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 000000000..af997b1c8
--- /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 000000000..5c823b263
--- /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 deef9d13d..49b0df17b 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 000000000..6460af565
--- /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 000000000..558c38d4d
--- /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 000000000..2d0d48cc7
--- /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 000000000..cfd11123c
--- /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 000000000..32c923dec
--- /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 ed487e13f..41bf36b36 100644
--- a/java/src/com/android/inputmethod/event/Event.java
+++ b/java/src/com/android/inputmethod/event/Event.java
@@ -168,4 +168,8 @@ public class Event {
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 726b9206b..bcf10fc58 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 @@ public class EventInterpreter {
// 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 @@ public class EventInterpreter {
* 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 d81ee0b37..000000000
--- 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 de91567c7..000000000
--- 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/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 2711d249b..66cb9e35d 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -60,7 +60,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
public static final int THEME_INDEX_ICS = 0;
public static final int THEME_INDEX_GB = 1;
public static final int THEME_INDEX_KLP = 2;
- public static final int THEME_INDEX_DEFAULT = THEME_INDEX_KLP;
+ public static final int DEFAULT_THEME_INDEX = THEME_INDEX_KLP;
public static final KeyboardTheme[] KEYBOARD_THEMES = {
new KeyboardTheme(THEME_INDEX_ICS, R.style.KeyboardTheme_ICS),
new KeyboardTheme(THEME_INDEX_GB, R.style.KeyboardTheme_GB),
@@ -88,7 +88,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
* what user actually typed. */
private boolean mIsAutoCorrectionActive;
- private KeyboardTheme mKeyboardTheme = KEYBOARD_THEMES[THEME_INDEX_DEFAULT];
+ private KeyboardTheme mKeyboardTheme = KEYBOARD_THEMES[DEFAULT_THEME_INDEX];
private Context mThemeContext;
private static final KeyboardSwitcher sInstance = new KeyboardSwitcher();
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
index 7a0161e65..e9ecd1e67 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
/* ~ 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
/* 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
// 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 @@ public final class KeyboardTextsTable {
"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 @@ public final class KeyboardTextsTable {
"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 @@ public final class KeyboardTextsTable {
"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 @@ public final class KeyboardTextsTable {
"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 222e73529..4a18c2b3c 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.text.TextUtils;
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.annotations.UsedForTesting;
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 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
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 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
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 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
+ 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 cb55aa06c..fa7c4b4fc 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 final class InputLogic {
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 @@ public final class InputLogic {
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/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index b51c765f0..964bf2246 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -23,6 +23,7 @@ import android.content.res.Resources;
import android.preference.PreferenceManager;
import android.util.Log;
+import com.android.inputmethod.keyboard.KeyboardSwitcher;
import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
import com.android.inputmethod.latin.InputAttributes;
import com.android.inputmethod.latin.R;
@@ -270,25 +271,36 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
}
public static int readKeyboardThemeIndex(final SharedPreferences prefs, final Resources res) {
- final String defaultThemeIndex = res.getString(
- R.string.config_default_keyboard_theme_index);
- final String themeIndex = prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeIndex);
+ final int defaultThemeIndex = readDefaultKeyboardThemeIndex(res);
+ final String themeIndexString = prefs.getString(PREF_KEYBOARD_LAYOUT, null);
try {
- return Integer.valueOf(themeIndex);
+ return Integer.parseInt(themeIndexString);
} catch (final NumberFormatException e) {
// Format error, returns default keyboard theme index.
- Log.e(TAG, "Illegal keyboard theme in preference: " + themeIndex + ", default to "
+ Log.e(TAG, "Illegal keyboard theme in preference: " + themeIndexString + ", default to "
+ defaultThemeIndex, e);
- return Integer.valueOf(defaultThemeIndex);
+ }
+ return defaultThemeIndex;
+ }
+
+ private static int readDefaultKeyboardThemeIndex(final Resources res) {
+ final String defaultThemeIndexString = res.getString(
+ R.string.config_default_keyboard_theme_index);
+ try {
+ return Integer.parseInt(defaultThemeIndexString);
+ } catch (final NumberFormatException e) {
+ final int defaultThemeIndex = KeyboardSwitcher.DEFAULT_THEME_INDEX;
+ Log.e(TAG, "Corrupted default keyoard theme in resource: " + defaultThemeIndexString
+ + ", default to " + defaultThemeIndex, e);
+ return defaultThemeIndex;
}
}
public static int resetAndGetDefaultKeyboardThemeIndex(final SharedPreferences prefs,
final Resources res) {
- final String defaultThemeIndex = res.getString(
- R.string.config_default_keyboard_theme_index);
- prefs.edit().putString(PREF_KEYBOARD_LAYOUT, defaultThemeIndex).apply();
- return Integer.valueOf(defaultThemeIndex);
+ final int defaultThemeIndex = readDefaultKeyboardThemeIndex(res);
+ prefs.edit().putString(PREF_KEYBOARD_LAYOUT, Integer.toString(defaultThemeIndex)).apply();
+ return defaultThemeIndex;
}
public static String readPrefAdditionalSubtypes(final SharedPreferences prefs,
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
index 50fbbb19f..5a652a557 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
@@ -285,7 +285,7 @@ public final class SettingsValues {
// When autoCorrectionThreshold is greater than 1.0, it's like auto correction is off.
final float autoCorrectionThreshold;
try {
- final int arrayIndex = Integer.valueOf(currentAutoCorrectionSetting);
+ final int arrayIndex = Integer.parseInt(currentAutoCorrectionSetting);
if (arrayIndex >= 0 && arrayIndex < autoCorrectionThresholdValues.length) {
final String val = autoCorrectionThresholdValues[arrayIndex];
if (FLOAT_MAX_VALUE_MARKER_STRING.equals(val)) {
diff --git a/native/jni/Android.mk b/native/jni/Android.mk
index 9657b9d65..afb32d1da 100644
--- a/native/jni/Android.mk
+++ b/native/jni/Android.mk
@@ -29,7 +29,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
-Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls \
- -Woverloaded-virtual -Wstrict-null-sentinel -Wsign-promo -Wno-system-headers
+ -Woverloaded-virtual -Wsign-promo -Wno-system-headers
# To suppress compiler warnings for unused variables/functions used for debug features etc.
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
@@ -60,8 +60,9 @@ endif # FLAG_DO_PROFILE
LOCAL_MODULE := libjni_latinime_common_static
LOCAL_MODULE_TAGS := optional
+LOCAL_CLANG := true
LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_NDK_STL_VARIANT := c++_static
include $(BUILD_STATIC_LIBRARY)
######################################
@@ -83,8 +84,9 @@ endif # FLAG_DO_PROFILE
LOCAL_MODULE := libjni_latinime
LOCAL_MODULE_TAGS := optional
+LOCAL_CLANG := true
LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := gnustl_static
+LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_LDFLAGS += -ldl
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
index 0993c4b67..a4c69e023 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java
@@ -42,7 +42,7 @@ import java.util.Locale;
@SmallTest
public class KeyboardLayoutSetTestsBase extends AndroidTestCase {
private static final KeyboardTheme DEFAULT_KEYBOARD_THEME =
- KeyboardSwitcher.KEYBOARD_THEMES[KeyboardSwitcher.THEME_INDEX_DEFAULT];
+ KeyboardSwitcher.KEYBOARD_THEMES[KeyboardSwitcher.DEFAULT_THEME_INDEX];
// All input method subtypes of LatinIME.
private final ArrayList<InputMethodSubtype> mAllSubtypesList = CollectionUtils.newArrayList();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java b/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
index 444730a2e..838f98768 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Arabic.java
@@ -142,7 +142,7 @@ public final class Arabic extends LayoutBase {
} else {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
// U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
- builder.insertKeysAtRow(3, 2, key("\u0626"));
+ builder.insertKeysAtRow(3, 2, "\u0626");
return builder.build();
}
}
@@ -198,7 +198,7 @@ public final class Arabic extends LayoutBase {
// U+069C: "ڜ" ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE
key("\u0634", moreKey("\u069C")),
// U+0633: "س" ARABIC LETTER SEEN
- key("\u0633"),
+ "\u0633",
// U+064A: "ي" ARABIC LETTER YEH
// U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
// U+0649: "ى" ARABIC LETTER ALEF MAKSURA
@@ -226,18 +226,16 @@ public final class Arabic extends LayoutBase {
// U+0671: "ٱ" ARABIC LETTER ALEF WASLA
key("\u0627", joinMoreKeys("\u0622", "\u0621", "\u0623", "\u0625", "\u0671")),
// U+062A: "ت" ARABIC LETTER TEH
- key("\u062A"),
// U+0646: "ن" ARABIC LETTER NOON
- key("\u0646"),
// U+0645: "م" ARABIC LETTER MEEM
- key("\u0645"),
+ "\u062A", "\u0646", "\u0645",
// U+0643: "ك" ARABIC LETTER KAF
// U+06AF: "گ" ARABIC LETTER GAF
// U+06A9: "ک" ARABIC LETTER KEHEH
key("\u0643", joinMoreKeys("\u06AF", "\u06A9")),
// U+0637: "ط" ARABIC LETTER TAH
- key("\u0637"))
- .setKeysOfRow(3, joinKeys(
+ "\u0637")
+ .setKeysOfRow(3,
// U+0630: "ذ" ARABIC LETTER THAL
// U+0621: "ء" ARABIC LETTER HAMZA
// U+0624: "ؤ" ARABIC LETTER WAW WITH HAMZA ABOVE
@@ -254,7 +252,7 @@ public final class Arabic extends LayoutBase {
key("\u0632", moreKey("\u0698")),
// U+0638: "ظ" ARABIC LETTER ZAH
// U+062F: "د" ARABIC LETTER DAL
- "\u0638", "\u062F"))
+ "\u0638", "\u062F")
.build();
private static class ArabicSymbols extends RtlSymbols {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
index 24d85cf76..eaa25823f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java
@@ -51,7 +51,7 @@ public final class Azerty extends LayoutBase {
} else {
builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
getCustomizer().setAccentedLetters(builder);
- builder.replaceKeyOfLabel(ROW3_QUOTE, key("?"));
+ builder.replaceKeyOfLabel(ROW3_QUOTE, "?");
}
builder.toUpperCase(getLocale());
return builder.build();
@@ -71,7 +71,7 @@ public final class Azerty extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")))
- .setLabelsOfRow(2, "q", "s", "d", "f", "g", "h", "j", "k", "l", "m")
- .setLabelsOfRow(3, "w", "x", "c", "v", "b", "n", ROW3_QUOTE)
+ .setKeysOfRow(2, "q", "s", "d", "f", "g", "h", "j", "k", "l", "m")
+ .setKeysOfRow(3, "w", "x", "c", "v", "b", "n", ROW3_QUOTE)
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java b/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
index a1ad54957..0972cc12f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java
@@ -76,7 +76,7 @@ public final class Bulgarian extends LayoutBase {
// U+043F: "п" CYRILLIC SMALL LETTER PE
key("\u043F", moreKey("0")),
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
- key("\u0447"))
+ "\u0447")
// U+0430: "а" CYRILLIC SMALL LETTER A
// U+0441: "с" CYRILLIC SMALL LETTER ES
// U+0434: "д" CYRILLIC SMALL LETTER DE
@@ -88,7 +88,7 @@ public final class Bulgarian extends LayoutBase {
// U+043B: "л" CYRILLIC SMALL LETTER EL
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
// U+0449: "щ" CYRILLIC SMALL LETTER SHCHA
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
"\u0430", "\u0441", "\u0434", "\u0444", "\u0433", "\u0445", "\u0439", "\u043A",
"\u043B", "\u0448", "\u0449")
// U+0437: "з" CYRILLIC SMALL LETTER ZE
@@ -99,7 +99,7 @@ public final class Bulgarian extends LayoutBase {
// U+043D: "н" CYRILLIC SMALL LETTER EN
// U+043C: "м" CYRILLIC SMALL LETTER EM
// U+044E: "ю" CYRILLIC SMALL LETTER YU
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
"\u0437", "\u044C", "\u0446", "\u0436", "\u0431", "\u043D", "\u043C", "\u044E")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java b/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
index b47b59216..f8de93491 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java
@@ -66,7 +66,7 @@ public final class BulgarianBds extends LayoutBase {
// U+0446: "ц" CYRILLIC SMALL LETTER TSE
key("\u0446", moreKey("0")),
// U+0431: "б" CYRILLIC SMALL LETTER BE
- key("\u0431"))
+ "\u0431")
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
// U+044F: "я" CYRILLIC SMALL LETTER YA
// U+0430: "а" CYRILLIC SMALL LETTER A
@@ -78,7 +78,7 @@ public final class BulgarianBds extends LayoutBase {
// U+0432: "в" CYRILLIC SMALL LETTER VE
// U+043C: "м" CYRILLIC SMALL LETTER EM
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
"\u044C", "\u044F", "\u0430", "\u043E", "\u0436", "\u0433", "\u0442", "\u043D",
"\u0432", "\u043C", "\u0447")
// U+044E: "ю" CYRILLIC SMALL LETTER YU
@@ -90,7 +90,7 @@ public final class BulgarianBds extends LayoutBase {
// U+043F: "п" CYRILLIC SMALL LETTER PE
// U+0440: "р" CYRILLIC SMALL LETTER ER
// U+043B: "л" CYRILLIC SMALL LETTER EL
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
"\u044E", "\u0439", "\u044A", "\u044D", "\u0444", "\u0445", "\u043F", "\u0440",
"\u043B")
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
index 6d2e245a7..f6de53fa7 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java
@@ -82,7 +82,7 @@ public final class EastSlavic extends LayoutBase {
// U+0437: "з" CYRILLIC SMALL LETTER ZE
key("\u0437", moreKey("0")),
// U+0445: "х" CYRILLIC SMALL LETTER HA
- key("\u0445"))
+ "\u0445")
// U+0444: "ф" CYRILLIC SMALL LETTER EF
// U+0432: "в" CYRILLIC SMALL LETTER VE
// U+0430: "а" CYRILLIC SMALL LETTER A
@@ -92,7 +92,7 @@ public final class EastSlavic extends LayoutBase {
// U+043B: "л" CYRILLIC SMALL LETTER EL
// U+0434: "д" CYRILLIC SMALL LETTER DE
// U+0436: "ж" CYRILLIC SMALL LETTER ZHE
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
"\u0444", ROW2_2, "\u0432", "\u0430", "\u043F", "\u0440", "\u043E", "\u043B",
"\u0434", "\u0436", ROW2_11)
// U+044F: "я" CYRILLIC SMALL LETTER YA
@@ -103,7 +103,7 @@ public final class EastSlavic extends LayoutBase {
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
// U+0431: "б" CYRILLIC SMALL LETTER BE
// U+044E: "ю" CYRILLIC SMALL LETTER YU
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
"\u044F", "\u0447", "\u0441", "\u043C", ROW3_5, "\u0442", "\u044C", "\u0431",
"\u044E")
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java b/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
index afec46392..6da817fd9 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Farsi.java
@@ -148,7 +148,7 @@ public final class Farsi extends LayoutBase {
}
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
// U+0622: "آ" ARABIC LETTER ALEF WITH MADDA ABOVE
- builder.insertKeysAtRow(3, 10, key("\u0622"));
+ builder.insertKeysAtRow(3, 10, "\u0622");
return builder.build();
}
@@ -195,12 +195,11 @@ public final class Farsi extends LayoutBase {
// U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO
key("\u062D", joinMoreKeys("\u06F0", "0")),
// U+062C: "ج" ARABIC LETTER JEEM
- key("\u062C"))
+ "\u062C")
.setKeysOfRow(2,
// U+0634: "ش" ARABIC LETTER SHEEN
- key("\u0634"),
// U+0633: "س" ARABIC LETTER SEEN
- key("\u0633"),
+ "\u0634", "\u0633",
// U+06CC: "ی" ARABIC LETTER FARSI YEH
// U+0626: "ئ" ARABIC LETTER YEH WITH HAMZA ABOVE
// U+064A: "ي" ARABIC LETTER YEH
@@ -208,9 +207,8 @@ public final class Farsi extends LayoutBase {
// U+0649: "ى" ARABIC LETTER ALEF MAKSURA
key("\u06CC", joinMoreKeys("\u0626", "\u064A", moreKey("\uFBE8", "\u0649"))),
// U+0628: "ب" ARABIC LETTER BEH
- key("\u0628"),
// U+0644: "ل" ARABIC LETTER LAM
- key("\u0644"),
+ "\u0628", "\u0644",
// U+0627: "ا" ARABIC LETTER ALEF
// U+0671: "ٱ" ARABIC LETTER ALEF WASLA
// U+0621: "ء" ARABIC LETTER HAMZA
@@ -222,15 +220,14 @@ public final class Farsi extends LayoutBase {
// U+0629: "ة": ARABIC LETTER TEH MARBUTA
key("\u062A", moreKey("\u0629")),
// U+0646: "ن" ARABIC LETTER NOON
- key("\u0646"),
// U+0645: "م" ARABIC LETTER MEEM
- key("\u0645"),
+ "\u0646", "\u0645",
// U+06A9: "ک" ARABIC LETTER KEHEH
// U+0643: "ك" ARABIC LETTER KAF
key("\u06A9", moreKey("\u0643")),
// U+06AF: "گ" ARABIC LETTER GAF
- key("\u06AF"))
- .setKeysOfRow(3, joinKeys(
+ "\u06AF")
+ .setKeysOfRow(3,
// U+0638: "ظ" ARABIC LETTER ZAH
// U+0637: "ط" ARABIC LETTER TAH
// U+0698: "ژ" ARABIC LETTER JEH
@@ -244,7 +241,7 @@ public final class Farsi extends LayoutBase {
// U+0624: "ؤ" ARABIC LETTER WAW WITH HAMZA ABOVE
key("\u0648", moreKey("\u0624")),
// U+0686: "چ" ARABIC LETTER TCHEH
- "\u0686"))
+ "\u0686")
.build();
private static class FarsiSymbols extends RtlSymbols {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java b/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
index ad87c3b49..6f20dfcd1 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Georgian.java
@@ -99,9 +99,8 @@ public final class Georgian extends LayoutBase {
// U+10FA: "ჺ" GEORGIAN LETTER AIN
key("\u10D0", moreKey("\u10FA")),
// U+10E1: "ს" GEORGIAN LETTER SAN
- key("\u10E1"),
// U+10D3: "დ" GEORGIAN LETTER DON
- key("\u10D3"),
+ "\u10E1", "\u10D3",
// U+10E4: "ფ" GEORGIAN LETTER PHAR
// U+10F6: "ჶ" GEORGIAN LETTER FI
key("\u10E4", moreKey("\u10F6")),
@@ -115,27 +114,26 @@ public final class Georgian extends LayoutBase {
// U+10F7: "ჷ" GEORGIAN LETTER YN
key("\u10EF", moreKey("\u10F7")),
// U+10D9: "კ" GEORGIAN LETTER KAN
- key("\u10D9"),
// U+10DA: "ლ" GEORGIAN LETTER LAS
- key("\u10DA"))
+ "\u10D9", "\u10DA")
.setKeysOfRow(3,
// U+10D6: "ზ" GEORGIAN LETTER ZEN
- key("\u10D6"),
+ "\u10D6",
// U+10EE: "ხ" GEORGIAN LETTER XAN
// U+10F4: "ჴ" GEORGIAN LETTER HAR
key("\u10EE", moreKey("\u10F4")),
// U+10EA: "ც" GEORGIAN LETTER CAN
- key("\u10EA"),
+ "\u10EA",
// U+10D5: "ვ" GEORGIAN LETTER VIN
// U+10F3: "ჳ" GEORGIAN LETTER WE
key("\u10D5", moreKey("\u10F3")),
// U+10D1: "ბ" GEORGIAN LETTER BAN
- key("\u10D1"),
+ "\u10D1",
// U+10DC: "ნ" GEORGIAN LETTER NAR
// U+10FC: "ჼ" MODIFIER LETTER GEORGIAN NAR
key("\u10DC", moreKey("\u10FC")),
// U+10DB: "მ" GEORGIAN LETTER MAN
- key("\u10DB"))
+ "\u10DB")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
@@ -154,26 +152,12 @@ public final class Georgian extends LayoutBase {
key("O", moreKey("9")),
key("P", moreKey("0")))
.setKeysOfRow(2,
- key("A"),
// U+10E8: "შ" GEORGIAN LETTER SHIN
- key("\u10E8"),
- key("D"),
- key("F"),
- key("G"),
- key("H"),
// U+10DF: "ჟ" GEORGIAN LETTER ZHAR
- key("\u10DF"),
- key("K"),
- key("L"))
+ "A", "\u10E8", "D", "F", "G", "H", "\u10DF", "K", "L")
.setKeysOfRow(3,
// U+10EB: "ძ" GEORGIAN LETTER JIL
- key("\u10EB"),
- key("X"),
// U+10E9: "ჩ" GEORGIAN LETTER CHIN
- key("\u10E9"),
- key("V"),
- key("B"),
- key("N"),
- key("M"))
+ "\u10EB", "X", "\u10E9", "V", "B", "N", "M")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
index 762170b3d..1a71fad95 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java
@@ -112,37 +112,28 @@ public final class Greek extends LayoutBase {
// U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS
key("\u03B1", moreKey("\u03AC")),
// U+03C3: "σ" GREEK SMALL LETTER SIGMA
- key("\u03C3"),
// U+03B4: "δ" GREEK SMALL LETTER DELTA
- key("\u03B4"),
// U+03C6: "φ" GREEK SMALL LETTER PHI
- key("\u03C6"),
// U+03B3: "γ" GREEK SMALL LETTER GAMMA
- key("\u03B3"),
+ "\u03C3", "\u03B4", "\u03C6", "\u03B3",
// U+03B7: "η" GREEK SMALL LETTER ETA
// U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS
key("\u03B7", moreKey("\u03AE")),
// U+03BE: "ξ" GREEK SMALL LETTER XI
- key("\u03BE"),
// U+03BA: "κ" GREEK SMALL LETTER KAPPA
- key("\u03BA"),
// U+03BB: "λ" GREEK SMALL LETTER LAMDA
- key("\u03BB"))
+ "\u03BE", "\u03BA", "\u03BB")
.setKeysOfRow(3,
// U+03B6: "ζ" GREEK SMALL LETTER ZETA
- key("\u03B6"),
// U+03C7: "χ" GREEK SMALL LETTER CHI
- key("\u03C7"),
// U+03C8: "ψ" GREEK SMALL LETTER PSI
- key("\u03C8"),
+ "\u03B6", "\u03C7", "\u03C8",
// U+03C9: "ω" GREEK SMALL LETTER OMEGA
// U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS
key("\u03C9", moreKey("\u03CE")),
// U+03B2: "β" GREEK SMALL LETTER BETA
- key("\u03B2"),
// U+03BD: "ν" GREEK SMALL LETTER NU
- key("\u03BD"),
// U+03BC: "μ" GREEK SMALL LETTER MU
- key("\u03BC"))
+ "\u03B2", "\u03BD", "\u03BC")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
index a5befab00..83446dee3 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Hebrew.java
@@ -129,16 +129,14 @@ public final class Hebrew extends LayoutBase {
key("\u05E4", moreKey("0")))
.setKeysOfRow(2,
// U+05E9: "ש" HEBREW LETTER SHIN
- key("\u05E9"),
// U+05D3: "ד" HEBREW LETTER DALET
- key("\u05D3"),
+ "\u05E9", "\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"),
+ "\u05DB", "\u05E2",
// U+05D9: "י" HEBREW LETTER YOD
// U+05F2 U+05B7: "ײַ" HEBREW LIGATURE YIDDISH DOUBLE YOD + HEBREW POINT PATAH
key("\u05D9", moreKey("\u05F2\u05B7")),
@@ -146,25 +144,19 @@ public final class Hebrew extends LayoutBase {
// 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"))
+ "\u05DC", "\u05DA", "\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"),
+ "\u05E1", "\u05D1", "\u05D4", "\u05E0", "\u05DE",
// U+05E6: "צ" HEBREW LETTER TSADI
// U+05E6 U+05F3: "צ׳" HEBREW LETTER TSADI + HEBREW PUNCTUATION GERESH
key("\u05E6", moreKey("\u05E6\u05F3")),
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
index c1d161615..7ff2dcbbc 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Hindi.java
@@ -155,7 +155,7 @@ public final class Hindi extends LayoutBase {
// U+0947/U+0902: "ें" DEVANAGARI VOWEL SIGN E/DEVANAGARI SIGN ANUSVARA
key("\u0947", moreKey("\u0947\u0902")),
// U+094D: "्" DEVANAGARI SIGN VIRAMA
- key("\u094D"),
+ "\u094D",
// U+093F: "ि" DEVANAGARI VOWEL SIGN I
// U+093F/U+0902: "िं" DEVANAGARI VOWEL SIGN I/DEVANAGARI SIGN ANUSVARA
key("\u093F", moreKey("\u093F\u0902")),
@@ -164,7 +164,7 @@ public final class Hindi extends LayoutBase {
// U+0941/U+0901: "ुँ" DEVANAGARI VOWEL SIGN U/DEVANAGARI SIGN CANDRABINDU
key("\u0941", joinMoreKeys("\u0941\u0902", "\u0941\u0901")),
// U+092A: "प" DEVANAGARI LETTER PA
- key("\u092A"),
+ "\u092A",
// U+0930: "र" DEVANAGARI LETTER RA
// U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
// U+0930/U+093C: "ऱ" DEVANAGARI LETTER RA/DEVANAGARI SIGN NUKTA
@@ -178,14 +178,12 @@ public final class Hindi extends LayoutBase {
// "त्र" DEVANAGARI LETTER TA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
key("\u0924", moreKey("\u0924\u094D\u0930")),
// U+091A: "च" DEVANAGARI LETTER CA
- key("\u091A"),
// U+091F: "ट" DEVANAGARI LETTER TTA
- key("\u091F"))
+ "\u091A","\u091F")
.setKeysOfRow(3,
// U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O
- key("\u0949"),
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
- key("\u0902"),
+ "\u0949", "\u0902",
// U+092E: "म" DEVANAGARI LETTER MA
// U+0950: "ॐ" DEVANAGARI OM
key("\u092E", moreKey("\u0950")),
@@ -195,13 +193,13 @@ public final class Hindi extends LayoutBase {
// U+0928/U+093C: "ऩ" DEVANAGARI LETTER NA/DEVANAGARI SIGN NUKTA
key("\u0928", joinMoreKeys("\u091E", "\u0919", "\u0928\u093C")),
// U+0935: "व" DEVANAGARI LETTER VA
- key("\u0935"),
+ "\u0935",
// U+0932: "ल" DEVANAGARI LETTER LA
// U+090C: "ऌ" DEVANAGARI LETTER VOCALIC L
// U+0961: "ॡ" DEVANAGARI LETTER VOCALIC LL
key("\u0932", joinMoreKeys("\u090C", "\u0961")),
// U+0938: "स" DEVANAGARI LETTER SA
- key("\u0938"),
+ "\u0938",
// U+092F: "य" DEVANAGARI LETTER YA
// U+095F: "य़" DEVANAGARI LETTER YYA
key("\u092F", moreKey("\u095F")),
@@ -232,11 +230,9 @@ public final class Hindi extends LayoutBase {
// U+090A/U+0901: "ऊँ" DEVANAGARI LETTER UU/DEVANAGARI SIGN CANDRABINDU
key("\u090A", joinMoreKeys("\u090A\u0902", "\u090A\u0901")),
// U+092D: "भ" DEVANAGARI LETTER BHA
- key("\u092D"),
// U+0903: "ः" DEVANAGARI SIGN VISARGA
- key("\u0903"),
// U+0918: "घ" DEVANAGARI LETTER GHA
- key("\u0918"),
+ "\u092D", "\u0903", "\u0918",
// U+0927: "ध" DEVANAGARI LETTER DHA
// U+0915/U+094D/U+0937:
// "क्ष" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER SSA
@@ -244,9 +240,8 @@ public final class Hindi extends LayoutBase {
// "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
key("\u0927", joinMoreKeys("\u0915\u094D\u0937", "\u0936\u094D\u0930")),
// U+091D: "झ" DEVANAGARI LETTER JHA
- key("\u091D"),
// U+0922: "ढ" DEVANAGARI LETTER DDHA
- key("\u0922"))
+ "\u091D", "\u0922")
.setKeysOfRow(2,
// U+0913: "ओ" DEVANAGARI LETTER O
// U+0913/U+0902: "ओं" DEVANAGARI LETTER O/DEVANAGARI SIGN ANUSVARA
@@ -282,33 +277,29 @@ public final class Hindi extends LayoutBase {
// U+0916/U+093C: "ख़" DEVANAGARI LETTER KHA/DEVANAGARI SIGN NUKTA
key("\u0916", moreKey("\u0916\u093C")),
// U+0925: "थ" DEVANAGARI LETTER THA
- key("\u0925"),
// U+091B: "छ" DEVANAGARI LETTER CHA
- key("\u091B"),
// U+0920: "ठ" DEVANAGARI LETTER TTHA
- key("\u0920"))
+ "\u0925", "\u091B", "\u0920")
.setKeysOfRow(3,
// U+0911: "ऑ" DEVANAGARI LETTER CANDRA O
- key("\u0911"),
+ "\u0911",
// U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
// U+0945: "ॅ" DEVANAGARI VOWEL SIGN CANDRA E
key("\u0901", moreKey("\u0945")),
// U+0923: "ण" DEVANAGARI LETTER NNA
- key("\u0923"),
// U+0929: "ऩ" DEVANAGARI LETTER NNNA
- key("\u0929"),
+ "\u0923", "\u0929",
// U+0933: "ळ" DEVANAGARI LETTER LLA
// U+0934: "ऴ" DEVANAGARI LETTER LLLA
key("\u0933", moreKey("\u0934")),
// U+0936: "श" DEVANAGARI LETTER SHA
- key("\u0936"),
// U+0937: "ष" DEVANAGARI LETTER SSA
- key("\u0937"),
+ "\u0936", "\u0937",
// U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
// U+0944: "ॄ" DEVANAGARI VOWEL SIGN VOCALIC RR
key("\u0943", moreKey("\u0944")),
// U+091E: "ञ" DEVANAGARI LETTER NYA
- key("\u091E"))
+ "\u091E")
.build();
static class HindiSymbols extends Symbols {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java b/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
index 61ade8b70..e7f6a6552 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Khmer.java
@@ -66,7 +66,7 @@ public final class Khmer extends LayoutBase {
return ALPHABET_COMMON;
}
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
- builder.addKeysOnTheRightOfRow(4, EXCLAMATION_AND_QUESTION_MARKS);
+ builder.addKeysOnTheRightOfRow(4, (Object[])EXCLAMATION_AND_QUESTION_MARKS);
return builder.build();
}
@@ -84,11 +84,9 @@ public final class Khmer extends LayoutBase {
ExpectedKeyboardBuilder convertCommonLayoutToKeyboard(final ExpectedKeyboardBuilder builder,
final boolean isPhone) {
final LayoutCustomizer customizer = getCustomizer();
- final ExpectedKey[] spacebar = joinKeys(
- customizer.getKeysLeftToSpacebar(isPhone),
- customizer.getSpaceKeys(isPhone),
- customizer.getKeysRightToSpacebar(isPhone));
- builder.setKeysOfRow(5, spacebar);
+ builder.setKeysOfRow(5, (Object[])customizer.getSpaceKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(5, (Object[])customizer.getKeysLeftToSpacebar(isPhone));
+ builder.addKeysOnTheRightOfRow(5, (Object[])customizer.getKeysRightToSpacebar(isPhone));
if (isPhone) {
builder.addKeysOnTheRightOfRow(4, DELETE_KEY)
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey())
@@ -99,8 +97,8 @@ public final class Khmer extends LayoutBase {
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
}
- builder.addKeysOnTheLeftOfRow(4, customizer.getLeftShiftKeys(isPhone))
- .addKeysOnTheRightOfRow(4, customizer.getRightShiftKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
+ .addKeysOnTheRightOfRow(4, (Object[])customizer.getRightShiftKeys(isPhone));
return builder;
}
@@ -144,27 +142,18 @@ public final class Khmer extends LayoutBase {
key("\u17B2", moreKey("\u17B1")))
.setKeysOfRow(2,
// U+1786: "ឆ" KHMER LETTER CHA
- key("\u1786"),
// U+17B9: "ឹ" KHMER VOWEL SIGN Y
- key("\u17B9"),
// U+17C1: "េ" KHMER VOWEL SIGN E
- key("\u17C1"),
// U+179A: "រ" KHMER LETTER RO
- key("\u179A"),
// U+178F: "ត" KHMER LETTER TA
- key("\u178F"),
// U+1799: "យ" KHMER LETTER YO
- key("\u1799"),
// U+17BB: "ុ" KHMER VOWEL SIGN U
- key("\u17BB"),
// U+17B7: "ិ" KHMER VOWEL SIGN I
- key("\u17B7"),
// U+17C4: "ោ" KHMER VOWEL SIGN OO
- key("\u17C4"),
// U+1795: "ផ" KHMER LETTER PHA
- key("\u1795"),
// U+17C0: "ៀ" KHMER VOWEL SIGN IE
- key("\u17C0"),
+ "\u1786", "\u17B9", "\u17C1", "\u179A", "\u178F", "\u1799", "\u17BB", "\u17B7",
+ "\u17C4", "\u1795", "\u17C0",
// U+17AA: "ឪ" KHMER INDEPENDENT VOWEL QUUV
// U+17A7: "ឧ" KHMER INDEPENDENT VOWEL QU
// U+17B1: "ឱ" KHMER INDEPENDENT VOWEL QOO TYPE ONE
@@ -174,32 +163,23 @@ public final class Khmer extends LayoutBase {
key("\u17AA", joinMoreKeys("\u17A7", "\u17B1", "\u17B3", "\u17A9", "\u17A8")))
.setKeysOfRow(3,
// U+17B6: "ា" KHMER VOWEL SIGN AA
- key("\u17B6"),
// U+179F: "ស" KHMER LETTER SA
- key("\u179F"),
// U+178A: "ដ" KHMER LETTER DA
- key("\u178A"),
// U+1790: "ថ" KHMER LETTER THA
- key("\u1790"),
// U+1784: "ង" KHMER LETTER NGO
- key("\u1784"),
// U+17A0: "ហ" KHMER LETTER HA
- key("\u17A0"),
// U+17D2: "្" KHMER SIGN COENG
- key("\u17D2"),
// U+1780: "ក" KHMER LETTER KA
- key("\u1780"),
// U+179B: "ល" KHMER LETTER LO
- key("\u179B"),
// U+17BE: "ើ" KHMER VOWEL SIGN OE
- key("\u17BE"),
// U+17CB: "់" KHMER SIGN BANTOC
- key("\u17CB"),
+ "\u17B6", "\u179F", "\u178A", "\u1790", "\u1784", "\u17A0", "\u17D2", "\u1780",
+ "\u179B", "\u17BE", "\u17CB",
// U+17AE: "ឮ" KHMER INDEPENDENT VOWEL LYY
// U+17AD: "ឭ" KHMER INDEPENDENT VOWEL LY
// U+17B0: "ឰ" KHMER INDEPENDENT VOWEL QAI
key("\u17AE", joinMoreKeys("\u17AD", "\u17B0")))
- .setLabelsOfRow(4,
+ .setKeysOfRow(4,
// U+178B: "ឋ" KHMER LETTER TTHA
// U+1781: "ខ" KHMER LETTER KHA
// U+1785: "ច" KHMER LETTER CA
@@ -241,7 +221,7 @@ public final class Khmer extends LayoutBase {
// U+00D7: "×" MULTIPLICATION SIGN
key("\u17CC", moreKey("\u00D7")),
// U+17CE: "៎" KHMER SIGN KAKABAT
- key("\u17CE"))
+ "\u17CE")
.setKeysOfRow(2,
// U+1788: "ឈ" KHMER LETTER CHO
// U+17DC: "ៜ" KHMER SIGN AVAKRAHASANYA
@@ -250,73 +230,52 @@ public final class Khmer extends LayoutBase {
// U+17DD: "៝" KHMER SIGN ATTHACAN
key("\u17BA", moreKey("\u17DD")),
// U+17C2: "ែ" KHMER VOWEL SIGN AE
- key("\u17C2"),
+ "\u17C2",
// U+17AC: "ឬ" KHMER INDEPENDENT VOWEL RYY
// U+17AB: "ឫ" KHMER INDEPENDENT VOWEL RY
key("\u17AC", moreKey("\u17AB")),
// U+1791: "ទ" KHMER LETTER TO
- key("\u1791"),
// U+17BD: "ួ" KHMER VOWEL SIGN UA
- key("\u17BD"),
// U+17BC: "ូ" KHMER VOWEL SIGN UU
- key("\u17BC"),
// U+17B8: "ី" KHMER VOWEL SIGN II
- key("\u17B8"),
// U+17C5: "ៅ" KHMER VOWEL SIGN AU
- key("\u17C5"),
// U+1797: "ភ" KHMER LETTER PHO
- key("\u1797"),
// U+17BF: "ឿ" KHMER VOWEL SIGN YA
- key("\u17BF"),
// U+17B0: "ឰ" KHMER INDEPENDENT VOWEL QAI
- key("\u17B0"))
+ "\u1791", "\u17BD", "\u17BC", "\u17B8", "\u17C5", "\u1797", "\u17BF", "\u17B0")
.setKeysOfRow(3,
// U+17B6/U+17C6: "ាំ" KHMER VOWEL SIGN AA/KHMER SIGN NIKAHIT
- key("\u17B6\u17C6"),
// U+17C3: "ៃ" KHMER VOWEL SIGN AI
- key("\u17C3"),
// U+178C: "ឌ" KHMER LETTER DO
- key("\u178C"),
// U+1792: "ធ" KHMER LETTER THO
- key("\u1792"),
// U+17A2: "អ" KHMER LETTER QAE
- key("\u17A2"),
+ "\u17B6\u17C6", "\u17C3", "\u178C", "\u1792", "\u17A2",
// U+17C7: "ះ" KHMER SIGN REAHMUK
// U+17C8: "ៈ" KHMER SIGN YUUKALEAPINTU
key("\u17C7", moreKey("\u17C8")),
// U+1789: "ញ" KHMER LETTER NYO
- key("\u1789"),
+ "\u1789",
// U+1782: "គ" KHMER LETTER KO
// U+179D: "ឝ" KHMER LETTER SHA
key("\u1782", moreKey("\u179D")),
// U+17A1: "ឡ" KHMER LETTER LA
- key("\u17A1"),
// U+17C4/U+17C7: "ោះ" KHMER VOWEL SIGN OO/KHMER SIGN REAHMUK
- key("\u17C4\u17C7"),
// U+17C9: "៉" KHMER SIGN MUUSIKATOAN
- key("\u17C9"),
// U+17AF: "ឯ" KHMER INDEPENDENT VOWEL QE
- key("\u17AF"))
+ "\u17A1", "\u17C4\u17C7", "\u17C9", "\u17AF")
.setKeysOfRow(4,
// U+178D: "ឍ" KHMER LETTER TTHO
- key("\u178D"),
// U+1783: "ឃ" KHMER LETTER KHO
- key("\u1783"),
// U+1787: "ជ" KHMER LETTER CO
- key("\u1787"),
// U+17C1/U+17C7: "េះ" KHMER VOWEL SIGN E/KHMER SIGN REAHMUK
- key("\u17C1\u17C7"),
+ "\u178D", "\u1783", "\u1787", "\u17C1\u17C7",
// U+1796: "ព" KHMER LETTER PO
// U+179E: "ឞ" KHMER LETTER SSO
key("\u1796", moreKey("\u179E")),
// U+178E: "ណ" KHMER LETTER NNO
- key("\u178E"),
// U+17C6: "ំ" KHMER SIGN NIKAHIT
- key("\u17C6"),
// U+17BB/U+17C7: "ុះ" KHMER VOWEL SIGN U/KHMER SIGN REAHMUK
- key("\u17BB\u17C7"),
// U+17D5: "៕" KHMER SIGN BARIYOOSAN
- key("\u17D5"),
- key("?"))
+ "\u178E", "\u17C6", "\u17BB\u17C7", "\u17D5", "?")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Lao.java b/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
index 488905504..6f2ef216f 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Lao.java
@@ -70,7 +70,7 @@ public final class Lao extends LayoutBase {
return ALPHABET_COMMON;
}
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
- builder.addKeysOnTheRightOfRow(4, EXCLAMATION_AND_QUESTION_MARKS);
+ builder.addKeysOnTheRightOfRow(4, (Object[])EXCLAMATION_AND_QUESTION_MARKS);
return builder.build();
}
@@ -88,11 +88,9 @@ public final class Lao extends LayoutBase {
ExpectedKeyboardBuilder convertCommonLayoutToKeyboard(final ExpectedKeyboardBuilder builder,
final boolean isPhone) {
final LayoutCustomizer customizer = getCustomizer();
- final ExpectedKey[] spacebar = joinKeys(
- customizer.getKeysLeftToSpacebar(isPhone),
- customizer.getSpaceKeys(isPhone),
- customizer.getKeysRightToSpacebar(isPhone));
- builder.setKeysOfRow(5, spacebar);
+ builder.setKeysOfRow(5, (Object[])customizer.getSpaceKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(5, (Object[])customizer.getKeysLeftToSpacebar(isPhone));
+ builder.addKeysOnTheRightOfRow(5, (Object[])customizer.getKeysRightToSpacebar(isPhone));
if (isPhone) {
builder.addKeysOnTheRightOfRow(4, DELETE_KEY)
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey())
@@ -103,8 +101,8 @@ public final class Lao extends LayoutBase {
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
}
- builder.addKeysOnTheLeftOfRow(4, customizer.getLeftShiftKeys(isPhone))
- .addKeysOnTheRightOfRow(4, customizer.getRightShiftKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
+ .addKeysOnTheRightOfRow(4, (Object[])customizer.getRightShiftKeys(isPhone));
return builder;
}
@@ -123,9 +121,8 @@ public final class Lao extends LayoutBase {
// U+0ED4: "໔" LAO DIGIT FOUR
key("\u0E96", joinMoreKeys("4", "\u0ED4")),
// U+0EB8: "ຸ" LAO VOWEL SIGN U
- key("\u0EB8"),
// U+0EB9: "ູ" LAO VOWEL SIGN UU
- key("\u0EB9"),
+ "\u0EB8", "\u0EB9",
// U+0E84: "ຄ" LAO LETTER KHO TAM
// U+0ED5: "໕" LAO DIGIT FIVE
key("\u0E84", joinMoreKeys("5", "\u0ED5")),
@@ -142,34 +139,26 @@ public final class Lao extends LayoutBase {
// U+0ED9: "໙" LAO DIGIT NINE
key("\u0E8A", joinMoreKeys("9", "\u0ED9")),
// U+0ECD: "ໍ" LAO NIGGAHITA
- key("\u0ECD"))
+ "\u0ECD")
.setKeysOfRow(2,
// U+0EBB: "ົ" LAO VOWEL SIGN MAI KON
- key("\u0EBB"),
+ "\u0EBB",
// U+0EC4: "ໄ" LAO VOWEL SIGN AI
// U+0ED0: "໐" LAO DIGIT ZERO
key("\u0EC4", joinMoreKeys("0", "\u0ED0")),
// U+0EB3: "ຳ" LAO VOWEL SIGN AM
- key("\u0EB3"),
// U+0E9E: "ພ" LAO LETTER PHO TAM
- key("\u0E9E"),
// U+0EB0: "ະ" LAO VOWEL SIGN A
- key("\u0EB0"),
// U+0EB4: "ິ" LAO VOWEL SIGN I
- key("\u0EB4"),
// U+0EB5: "ີ" LAO VOWEL SIGN II
- key("\u0EB5"),
// U+0EAE: "ຮ" LAO LETTER HO TAM
- key("\u0EAE"),
// U+0E99: "ນ" LAO LETTER NO
- key("\u0E99"),
// U+0E8D: "ຍ" LAO LETTER NYO
- key("\u0E8D"),
// U+0E9A: "ບ" LAO LETTER BO
- key("\u0E9A"),
// U+0EA5: "ລ" LAO LETTER LO LOOT
- key("\u0EA5"))
- .setLabelsOfRow(3,
+ "\u0EB3", "\u0E9E", "\u0EB0", "\u0EB4", "\u0EB5", "\u0EAE", "\u0E99", "\u0E8D",
+ "\u0E9A", "\u0EA5")
+ .setKeysOfRow(3,
// U+0EB1: "ັ" LAO VOWEL SIGN MAI KAN
// U+0EAB: "ຫ" LAO LETTER HO SUNG
// U+0E81: "ກ" LAO LETTER KO
@@ -184,7 +173,7 @@ public final class Lao extends LayoutBase {
// U+201C: "“" LEFT DOUBLE QUOTATION MARK
"\u0EB1", "\u0EAB", "\u0E81", "\u0E94", "\u0EC0", "\u0EC9", "\u0EC8", "\u0EB2",
"\u0EAA", "\u0EA7", "\u0E87", "\u201C")
- .setLabelsOfRow(4,
+ .setKeysOfRow(4,
// U+0E9C: "ຜ" LAO LETTER PHO SUNG
// U+0E9B: "ປ" LAO LETTER PO
// U+0EC1: "ແ" LAO VOWEL SIGN EI
@@ -200,7 +189,7 @@ public final class Lao extends LayoutBase {
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
- .setLabelsOfRow(1,
+ .setKeysOfRow(1,
// U+0ED1: "໑" LAO DIGIT ONE
// U+0ED2: "໒" LAO DIGIT TWO
// U+0ED3: "໓" LAO DIGIT THREE
@@ -215,7 +204,7 @@ public final class Lao extends LayoutBase {
// U+0ECD/U+0EC8: "ໍ່" LAO NIGGAHITA/LAO TONE MAI EK
"\u0ED1", "\u0ED2", "\u0ED3", "\u0ED4", "\u0ECC", "\u0EBC", "\u0ED5", "\u0ED6",
"\u0ED7", "\u0ED8", "\u0ED9", "\u0ECD\u0EC8")
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
// U+0EBB/U+0EC9: "" LAO VOWEL SIGN MAI KON/LAO TONE MAI THO
// U+0ED0: "໐" LAO DIGIT ZERO
// U+0EB3/U+0EC9: "ຳ້" LAO VOWEL SIGN AM/LAO TONE MAI THO
@@ -228,14 +217,14 @@ public final class Lao extends LayoutBase {
// U+201D: "”" RIGHT DOUBLE QUOTATION MARK
"\u0EBB\u0EC9", "\u0ED0", "\u0EB3\u0EC9", "_", "+", "\u0EB4\u0EC9",
"\u0EB5\u0EC9", "\u0EA3", "\u0EDC", "\u0EBD", "\u0EAB\u0EBC", "\u201D")
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
// U+0EB1/U+0EC9: "ັ້" LAO VOWEL SIGN MAI KAN/LAO TONE MAI THO
// U+0ECA: "໊" LAO TONE MAI TI
// U+0ECB: "໋" LAO TONE MAI CATAWA
// U+201C: "“" LEFT DOUBLE QUOTATION MARK
"\u0EB1\u0EC9", ";", ".", ",", ":", "\u0ECA", "\u0ECB", "!", "?", "%", "=",
"\u201C")
- .setLabelsOfRow(4,
+ .setKeysOfRow(4,
// U+20AD: "₭" KIP SIGN
// U+0EAF: "ຯ" LAO ELLIPSIS
// U+0EB6/U+0EC9: "ຶ້" LAO VOWEL SIGN Y/LAO TONE MAI THO
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
index 982777bd6..256a0d1a5 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java
@@ -161,7 +161,7 @@ public abstract class LayoutBase extends AbstractLayoutBase {
* @return the array of {@link ExpectedKey} that should be placed at left of the spacebar.
*/
public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) {
- return isPhone ? joinKeys(key(",", SETTINGS_KEY)) : joinKeys(key("/"));
+ return isPhone ? joinKeys(key(",", SETTINGS_KEY)) : joinKeys("/");
}
/**
@@ -171,7 +171,7 @@ public abstract class LayoutBase extends AbstractLayoutBase {
*/
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
final ExpectedKey periodKey = key(".", getPunctuationMoreKeys(isPhone));
- return isPhone ? joinKeys(periodKey) : joinKeys(key(","), periodKey);
+ return isPhone ? joinKeys(periodKey) : joinKeys(",", periodKey);
}
/**
@@ -288,11 +288,9 @@ public abstract class LayoutBase extends AbstractLayoutBase {
ExpectedKeyboardBuilder convertCommonLayoutToKeyboard(final ExpectedKeyboardBuilder builder,
final boolean isPhone) {
final LayoutCustomizer customizer = getCustomizer();
- final ExpectedKey[] spacebar = joinKeys(
- customizer.getKeysLeftToSpacebar(isPhone),
- customizer.getSpaceKeys(isPhone),
- customizer.getKeysRightToSpacebar(isPhone));
- builder.setKeysOfRow(4, spacebar);
+ builder.setKeysOfRow(4, (Object[])customizer.getSpaceKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getKeysLeftToSpacebar(isPhone));
+ builder.addKeysOnTheRightOfRow(4, (Object[])customizer.getKeysRightToSpacebar(isPhone));
if (isPhone) {
builder.addKeysOnTheRightOfRow(3, DELETE_KEY)
.addKeysOnTheLeftOfRow(4, customizer.getSymbolsKey())
@@ -302,10 +300,9 @@ public abstract class LayoutBase extends AbstractLayoutBase {
.addKeysOnTheRightOfRow(2, ENTER_KEY)
.addKeysOnTheLeftOfRow(4, customizer.getSymbolsKey(), SETTINGS_KEY)
.addKeysOnTheRightOfRow(4, EMOJI_KEY);
-
}
- builder.addKeysOnTheLeftOfRow(3, customizer.getLeftShiftKeys(isPhone))
- .addKeysOnTheRightOfRow(3, customizer.getRightShiftKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(3, (Object[])customizer.getLeftShiftKeys(isPhone))
+ .addKeysOnTheRightOfRow(3, (Object[])customizer.getRightShiftKeys(isPhone));
return builder;
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java b/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
index 3c9f4a06d..3c6c05841 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Mongolian.java
@@ -77,37 +77,33 @@ public final class Mongolian extends LayoutBase {
// U+0437: "з" CYRILLIC SMALL LETTER ZE
key("\u0437", moreKey("0")),
// U+043A: "к" CYRILLIC SMALL LETTER KA
- key("\u043A"))
- // U+0439: "й" CYRILLIC SMALL LETTER SHORT I
- // U+044B: "ы" CYRILLIC SMALL LETTER YERU
- // U+0431: "б" CYRILLIC SMALL LETTER BE
- // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O
- // U+0430: "а" CYRILLIC SMALL LETTER A
- // U+0445: "х" CYRILLIC SMALL LETTER HA
- // U+0440: "р" CYRILLIC SMALL LETTER ER
- // U+043E: "о" CYRILLIC SMALL LETTER O
- // U+043B: "л" CYRILLIC SMALL LETTER EL
- // U+0434: "д" CYRILLIC SMALL LETTER DE
- // U+043F: "п" CYRILLIC SMALL LETTER PE
- .setLabelsOfRow(2,
+ "\u043A")
+ .setKeysOfRow(2,
+ // U+0439: "й" CYRILLIC SMALL LETTER SHORT I
+ // U+044B: "ы" CYRILLIC SMALL LETTER YERU
+ // U+0431: "б" CYRILLIC SMALL LETTER BE
+ // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O
+ // U+0430: "а" CYRILLIC SMALL LETTER A
+ // U+0445: "х" CYRILLIC SMALL LETTER HA
+ // U+0440: "р" CYRILLIC SMALL LETTER ER
+ // U+043E: "о" CYRILLIC SMALL LETTER O
+ // U+043B: "л" CYRILLIC SMALL LETTER EL
+ // U+0434: "д" CYRILLIC SMALL LETTER DE
+ // U+043F: "п" CYRILLIC SMALL LETTER PE
"\u0439", "\u044B", "\u0431", "\u04E9", "\u0430", "\u0445", "\u0440", "\u043E",
"\u043B", "\u0434", "\u043F")
.setKeysOfRow(3,
// U+044F: "я" CYRILLIC SMALL LETTER YA
- key("\u044F"),
// U+0447: "ч" CYRILLIC SMALL LETTER CHE
- key("\u0447"),
+ "\u044F", "\u0447",
// U+0451: "ё" CYRILLIC SMALL LETTER IO
// U+0435: "е" CYRILLIC SMALL LETTER IE
key("\u0451", moreKey("\u0435")),
// U+0441: "с" CYRILLIC SMALL LETTER ES
- key("\u0441"),
// U+043C: "м" CYRILLIC SMALL LETTER EM
- key("\u043C"),
// U+0438: "и" CYRILLIC SMALL LETTER I
- key("\u0438"),
// U+0442: "т" CYRILLIC SMALL LETTER TE
- key("\u0442"),
+ "\u0441", "\u043C", "\u0438", "\u0442",
// U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
key("\u044C", moreKey("\u044A")),
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
index c0bc29f2a..7cfe3444c 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/NepaliRomanized.java
@@ -99,77 +99,76 @@ public final class NepaliRomanized extends LayoutBase {
// U+0966: "०" DEVANAGARI DIGIT ZERO
key("\u092A", joinMoreKeys("\u0966", "0")),
// U+0907: "इ" DEVANAGARI LETTER I
- key("\u0907"))
- // U+093E: "ा" DEVANAGARI VOWEL SIGN AA
- // U+0938: "स" DEVANAGARI LETTER SA
- // U+0926: "द" DEVANAGARI LETTER DA
- // U+0909: "उ" DEVANAGARI LETTER U
- // U+0917: "ग" DEVANAGARI LETTER GA
- // U+0939: "ह" DEVANAGARI LETTER HA
- // U+091C: "ज" DEVANAGARI LETTER JA
- // U+0915: "क" DEVANAGARI LETTER KA
- // U+0932: "ल" DEVANAGARI LETTER LA
- // U+090F: "ए" DEVANAGARI LETTER E
- // U+0950: "ॐ" DEVANAGARI OM
- .setLabelsOfRow(2,
+ "\u0907")
+ .setKeysOfRow(2,
+ // U+093E: "ा" DEVANAGARI VOWEL SIGN AA
+ // U+0938: "स" DEVANAGARI LETTER SA
+ // U+0926: "द" DEVANAGARI LETTER DA
+ // U+0909: "उ" DEVANAGARI LETTER U
+ // U+0917: "ग" DEVANAGARI LETTER GA
+ // U+0939: "ह" DEVANAGARI LETTER HA
+ // U+091C: "ज" DEVANAGARI LETTER JA
+ // U+0915: "क" DEVANAGARI LETTER KA
+ // U+0932: "ल" DEVANAGARI LETTER LA
+ // U+090F: "ए" DEVANAGARI LETTER E
+ // U+0950: "ॐ" DEVANAGARI OM
"\u093E", "\u0938", "\u0926", "\u0909", "\u0917", "\u0939", "\u091C", "\u0915",
"\u0932", "\u090F", "\u0950")
- // U+0937: "ष" DEVANAGARI LETTER SSA
- // U+0921: "ड" DEVANAGARI LETTER DDA
- // U+091A: "च" DEVANAGARI LETTER CA
- // U+0935: "व" DEVANAGARI LETTER VA
- // U+092C: "ब" DEVANAGARI LETTER BHA
- // U+0928: "न" DEVANAGARI LETTER NA
- // U+092E: "म" DEVANAGARI LETTER MA
- // U+0964: "।" DEVANAGARI DANDA
- // U+094D: "्" DEVANAGARI SIGN VIRAMA
- .setLabelsOfRow(3,
- "\u0937", "\u0921", "\u091A", "\u0935", "\u092C", "\u0928", "\u092E", "\u0964",
+ .setKeysOfRow(3,
+ // U+0937: "ष" DEVANAGARI LETTER SSA
+ // U+0921: "ड" DEVANAGARI LETTER DDA
+ // U+091A: "च" DEVANAGARI LETTER CA
+ // U+0935: "व" DEVANAGARI LETTER VA
+ // U+092C: "ब" DEVANAGARI LETTER BHA
+ // U+0928: "न" DEVANAGARI LETTER NA
+ // U+092E: "म" DEVANAGARI LETTER MA
+ "\u0937", "\u0921", "\u091A", "\u0935", "\u092C", "\u0928", "\u092E",
+ // U+0964: "।" DEVANAGARI DANDA
+ // U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
+ key("\u0964", moreKey("\u093D")),
+ // U+094D: "्" DEVANAGARI SIGN VIRAMA
"\u094D")
- // U+0964: "।" DEVANAGARI DANDA
- // U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
- .setMoreKeysOf("\u0964", "\u093D")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
- // U+0920: "ठ" DEVANAGARI LETTER TTHA
- // U+0914: "औ" DEVANAGARI LETTER AU
- // U+0948: "ै" DEVANAGARI VOWEL SIGN AI
- // U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
- // U+0925: "थ" DEVANAGARI LETTER THA
- // U+091E: "ञ" DEVANAGARI LETTER NYA
- // U+0942: "ू" DEVANAGARI VOWEL SIGN UU
- // U+0940: "ी" DEVANAGARI VOWEL SIGN II
- // U+0913: "ओ" DEVANAGARI LETTER O
- // U+092B: "फ" DEVANAGARI LETTER PHA
- // U+0908: "ई" DEVANAGARI LETTER II
- .setLabelsOfRow(1,
+ .setKeysOfRow(1,
+ // U+0920: "ठ" DEVANAGARI LETTER TTHA
+ // U+0914: "औ" DEVANAGARI LETTER AU
+ // U+0948: "ै" DEVANAGARI VOWEL SIGN AI
+ // U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
+ // U+0925: "थ" DEVANAGARI LETTER THA
+ // U+091E: "ञ" DEVANAGARI LETTER NYA
+ // U+0942: "ू" DEVANAGARI VOWEL SIGN UU
+ // U+0940: "ी" DEVANAGARI VOWEL SIGN II
+ // U+0913: "ओ" DEVANAGARI LETTER O
+ // U+092B: "फ" DEVANAGARI LETTER PHA
+ // U+0908: "ई" DEVANAGARI LETTER II
"\u0920", "\u0914", "\u0948", "\u0943", "\u0925", "\u091E", "\u0942", "\u0940",
"\u0913", "\u092B", "\u0908")
- // U+0906: "आ" DEVANAGARI LETTER AA
- // U+0936: "श" DEVANAGARI LETTER SHA
- // U+0927: "ध" DEVANAGARI LETTER DHA
- // U+090A: "ऊ" DEVANAGARI LETTER UU
- // U+0918: "घ" DEVANAGARI LETTER GHA
- // U+0905: "अ" DEVANAGARI LETTER A
- // U+091D: "झ" DEVANAGARI LETTER JHA
- // U+0916: "ख" DEVANAGARI LETTER KHA
- // U+0965: "॥" DEVANAGARI DOUBLE DANDA
- // U+0910: "ऐ" DEVANAGARI LETTER AI
- // U+0903: "ः" DEVANAGARI SIGN VISARGA
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
+ // U+0906: "आ" DEVANAGARI LETTER AA
+ // U+0936: "श" DEVANAGARI LETTER SHA
+ // U+0927: "ध" DEVANAGARI LETTER DHA
+ // U+090A: "ऊ" DEVANAGARI LETTER UU
+ // U+0918: "घ" DEVANAGARI LETTER GHA
+ // U+0905: "अ" DEVANAGARI LETTER A
+ // U+091D: "झ" DEVANAGARI LETTER JHA
+ // U+0916: "ख" DEVANAGARI LETTER KHA
+ // U+0965: "॥" DEVANAGARI DOUBLE DANDA
+ // U+0910: "ऐ" DEVANAGARI LETTER AI
+ // U+0903: "ः" DEVANAGARI SIGN VISARGA
"\u0906", "\u0936", "\u0927", "\u090A", "\u0918", "\u0905", "\u091D", "\u0916",
"\u0965", "\u0910", "\u0903")
- // U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
- // U+0922: "ढ" DEVANAGARI LETTER DDHA
- // U+091B: "छ" DEVANAGARI LETTER CHA
- // U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
- // U+092D: "भ" DEVANAGARI LETTER BHA
- // U+0923: "ण" DEVANAGARI LETTER NNA
- // U+0902: "ं" DEVANAGARI SIGN ANUSVARA
- // U+0919: "ङ" DEVANAGARI LETTER NGA
- // U+094D: "्" DEVANAGARI SIGN VIRAMA
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
+ // U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
+ // U+0922: "ढ" DEVANAGARI LETTER DDHA
+ // U+091B: "छ" DEVANAGARI LETTER CHA
+ // U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
+ // U+092D: "भ" DEVANAGARI LETTER BHA
+ // U+0923: "ण" DEVANAGARI LETTER NNA
+ // U+0902: "ं" DEVANAGARI SIGN ANUSVARA
+ // U+0919: "ङ" DEVANAGARI LETTER NGA
+ // U+094D: "्" DEVANAGARI SIGN VIRAMA
"\u090B", "\u0922", "\u091B", "\u0901", "\u092D", "\u0923", "\u0902", "\u0919",
"\u094D")
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java b/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
index 658dec03e..1599fd7a6 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/NepaliTraditional.java
@@ -63,7 +63,7 @@ public final class NepaliTraditional extends LayoutBase {
// U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
key("\u0947", joinMoreKeys("\u0903", "\u093D")),
// U+0964: "।" DEVANAGARI DANDA
- key("\u0964"),
+ "\u0964",
// U+0930: "र" DEVANAGARI LETTER RA
// U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U
key("\u0930", moreKey("\u0930\u0941")));
@@ -73,9 +73,8 @@ public final class NepaliTraditional extends LayoutBase {
// U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
key("\u0903", moreKey("\u093D")),
// U+0947: "े" DEVANAGARI VOWEL SIGN E
- key("\u0947"),
// U+0964: "।" DEVANAGARI DANDA
- key("\u0964"),
+ "\u0947", "\u0964",
// U+0930: "र" DEVANAGARI LETTER RA
key("\u0930", moreKey("!")),
// U+094D: "्" DEVANAGARI SIGN VIRAMA
@@ -94,9 +93,8 @@ public final class NepaliTraditional extends LayoutBase {
if (isPhone) {
builder.addKeysOnTheRightOfRow(3,
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
- key("\u0902"),
// U+0919: "ङ" DEVANAGARI LETTER NGA
- key("\u0919"),
+ "\u0902", "\u0919",
// U+0948: "ै" DEVANAGARI VOWEL SIGN AI
// U+0936/U+094D/U+0930:
// "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
@@ -104,16 +102,15 @@ public final class NepaliTraditional extends LayoutBase {
} else {
builder.addKeysOnTheRightOfRow(3,
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
- key("\u0902"),
// U+0919: "ङ" DEVANAGARI LETTER NGA
- key("\u0919"),
+ "\u0902", "\u0919",
// U+0948: "ै" DEVANAGARI VOWEL SIGN AI
// U+0936/U+094D/U+0930:
// "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
key("\u0948", moreKey("\u0936\u094D\u0930")),
// U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U
key("\u0930\u0941", moreKey("!")),
- key("?"));
+ "?");
}
return builder.build();
}
@@ -153,27 +150,28 @@ public final class NepaliTraditional extends LayoutBase {
// U+0907: "इ" DEVANAGARI LETTER I
// U+0914: "औ" DEVANAGARI LETTER AU
key("\u0907", moreKey("\u0914")))
- // U+092C: "ब" DEVANAGARI LETTER BA
- // U+0915: "क" DEVANAGARI LETTER KA
- // U+092E: "म" DEVANAGARI LETTER MA
- // U+093E: "ा" DEVANAGARI VOWEL SIGN AA
- // U+0928: "न" DEVANAGARI LETTER NA
- // U+091C: "ज" DEVANAGARI LETTER JA
- // U+0935: "व" DEVANAGARI LETTER VA
- // U+092A: "प" DEVANAGARI LETTER PA
- // U+093F: "ि" DEVANAGARI VOWEL SIGN I
- // U+0938: "स" DEVANAGARI LETTER SA
- // U+0941: "ु" DEVANAGARI VOWEL SIGN U
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
+ // U+092C: "ब" DEVANAGARI LETTER BA
+ // U+0915: "क" DEVANAGARI LETTER KA
+ // U+092E: "म" DEVANAGARI LETTER MA
+ // U+093E: "ा" DEVANAGARI VOWEL SIGN AA
+ // U+0928: "न" DEVANAGARI LETTER NA
+ // U+091C: "ज" DEVANAGARI LETTER JA
+ // U+0935: "व" DEVANAGARI LETTER VA
+ // U+092A: "प" DEVANAGARI LETTER PA
+ // U+093F: "ि" DEVANAGARI VOWEL SIGN I
+ // U+0938: "स" DEVANAGARI LETTER SA
+ // U+0941: "ु" DEVANAGARI VOWEL SIGN U
"\u092C", "\u0915", "\u092E", "\u093E", "\u0928", "\u091C", "\u0935", "\u092A",
"\u093F", "\u0938", "\u0941")
- // U+0936: "श" DEVANAGARI LETTER SHA
- // U+0939: "ह" DEVANAGARI LETTER HA
- // U+0905: "अ" DEVANAGARI LETTER A
- // U+0916: "ख" DEVANAGARI LETTER KHA
- // U+0926: "द" DEVANAGARI LETTER DA
- // U+0932: "ल" DEVANAGARI LETTER LA
- .setLabelsOfRow(3, "\u0936", "\u0939", "\u0905", "\u0916", "\u0926", "\u0932")
+ .setKeysOfRow(3,
+ // U+0936: "श" DEVANAGARI LETTER SHA
+ // U+0939: "ह" DEVANAGARI LETTER HA
+ // U+0905: "अ" DEVANAGARI LETTER A
+ // U+0916: "ख" DEVANAGARI LETTER KHA
+ // U+0926: "द" DEVANAGARI LETTER DA
+ // U+0932: "ल" DEVANAGARI LETTER LA
+ "\u0936", "\u0939", "\u0905", "\u0916", "\u0926", "\u0932")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
@@ -222,32 +220,32 @@ public final class NepaliTraditional extends LayoutBase {
// U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
// U+0913: "ओ" DEVANAGARI LETTER O
key("\u0943", moreKey("\u0913")))
- // U+0906: "आ" DEVANAGARI LETTER AA
- // U+0919/U+094D: "ङ्" DEVANAGARI LETTER NGA/DEVANAGARI SIGN VIRAMA
- // U+0921/U+094D/U+0921:
- // "ड्ड" DEVANAGARI LETTER DDA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DDA
- // U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
- // U+0926/U+094D/U+0926:
- // "द्द" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DA
- // U+091D: "झ" DEVANAGARI LETTER JHA
- // U+094B: "ो" DEVANAGARI VOWEL SIGN O
- // U+092B: "फ" DEVANAGARI LETTER PHA
- // U+0940: "ी" DEVANAGARI VOWEL SIGN II
- // U+091F/U+094D/U+0920:
- // "ट्ठ" DEVANAGARI LETTER TTA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TTHA
- // U+0942: "ू" DEVANAGARI VOWEL SIGN UU
- .setLabelsOfRow(2,
+ .setKeysOfRow(2,
+ // U+0906: "आ" DEVANAGARI LETTER AA
+ // U+0919/U+094D: "ङ्" DEVANAGARI LETTER NGA/DEVANAGARI SIGN VIRAMA
+ // U+0921/U+094D/U+0921:
+ // "ड्ड" DEVANAGARI LETTER DDA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DDA
+ // U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
+ // U+0926/U+094D/U+0926:
+ // "द्द" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DA
+ // U+091D: "झ" DEVANAGARI LETTER JHA
+ // U+094B: "ो" DEVANAGARI VOWEL SIGN O
+ // U+092B: "फ" DEVANAGARI LETTER PHA
+ // U+0940: "ी" DEVANAGARI VOWEL SIGN II
+ // U+091F/U+094D/U+0920:
+ // "ट्ठ" DEVANAGARI LETTER TTA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TTHA
+ // U+0942: "ू" DEVANAGARI VOWEL SIGN UU
"\u0906", "\u0919\u094D", "\u0921\u094D\u0921", "\u0901", "\u0926\u094D\u0926",
"\u091D", "\u094B", "\u092B", "\u0940", "\u091F\u094D\u0920", "\u0942")
- // U+0915/U+094D: "क्" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA
- // U+0939/U+094D/U+092E:
- // "ह्म" DEVANAGARI LETTER HA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER MA
- // U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
- // U+0950: "ॐ" DEVANAGARI OM
- // U+094C: "ौ" DEVANAGARI VOWEL SIGN AU
- // U+0926/U+094D/U+092F:
- // "द्य" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER YA
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
+ // U+0915/U+094D: "क्" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA
+ // U+0939/U+094D/U+092E:
+ // "ह्म" DEVANAGARI LETTER HA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER MA
+ // U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
+ // U+0950: "ॐ" DEVANAGARI OM
+ // U+094C: "ौ" DEVANAGARI VOWEL SIGN AU
+ // U+0926/U+094D/U+092F:
+ // "द्य" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER YA
"\u0915\u094D", "\u0939\u094D\u092E", "\u090B", "\u0950", "\u094C",
"\u0926\u094D\u092F")
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
index a535ad2ed..cee7eee8d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java
@@ -51,8 +51,8 @@ public final class Nordic extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")),
- key(ROW1_11))
- .setLabelsOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
- .setLabelsOfRow(3, "z", "x", "c", "v", "b", "n", "m")
+ ROW1_11)
+ .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
+ .setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
index a0da7e37d..7ede74cef 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java
@@ -47,7 +47,7 @@ public final class Qwerty extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")))
- .setLabelsOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
- .setLabelsOfRow(3, "z", "x", "c", "v", "b", "n", "m")
+ .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
+ .setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
index 25f4734c4..6fce3f6d9 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java
@@ -44,7 +44,7 @@ public final class Qwertz extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")))
- .setLabelsOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
- .setLabelsOfRow(3, "y", "x", "c", "v", "b", "n", "m")
+ .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l")
+ .setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java b/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
index ad226ddec..4f8911baa 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java
@@ -82,28 +82,28 @@ public final class SouthSlavic extends LayoutBase {
// U+043F: "п" CYRILLIC SMALL LETTER PE
key("\u043F", moreKey("0")),
// U+0448: "ш" CYRILLIC SMALL LETTER SHA
- key("\u0448"))
- // U+0430: "а" CYRILLIC SMALL LETTER A
- // U+0441: "с" CYRILLIC SMALL LETTER ES
- // U+0434: "д" CYRILLIC SMALL LETTER DE
- // U+0444: "ф" CYRILLIC SMALL LETTER EF
- // U+0433: "г" CYRILLIC SMALL LETTER GHE
- // U+0445: "х" CYRILLIC SMALL LETTER HA
- // U+0458: "ј" CYRILLIC SMALL LETTER JE
- // U+043A: "к" CYRILLIC SMALL LETTER KA
- // U+043B: "л" CYRILLIC SMALL LETTER EL
- // U+0447: "ч" CYRILLIC SMALL LETTER CHE
- .setLabelsOfRow(2,
+ "\u0448")
+ .setKeysOfRow(2,
+ // U+0430: "а" CYRILLIC SMALL LETTER A
+ // U+0441: "с" CYRILLIC SMALL LETTER ES
+ // U+0434: "д" CYRILLIC SMALL LETTER DE
+ // U+0444: "ф" CYRILLIC SMALL LETTER EF
+ // U+0433: "г" CYRILLIC SMALL LETTER GHE
+ // U+0445: "х" CYRILLIC SMALL LETTER HA
+ // U+0458: "ј" CYRILLIC SMALL LETTER JE
+ // U+043A: "к" CYRILLIC SMALL LETTER KA
+ // U+043B: "л" CYRILLIC SMALL LETTER EL
+ // U+0447: "ч" CYRILLIC SMALL LETTER CHE
"\u0430", "\u0441", "\u0434", "\u0444", "\u0433", "\u0445", "\u0458", "\u043A",
"\u043B", "\u0447", ROW2_11)
- // U+045F: "џ" CYRILLIC SMALL LETTER DZHE
- // U+0446: "ц" CYRILLIC SMALL LETTER TSE
- // U+0432: "в" CYRILLIC SMALL LETTER VE
- // U+0431: "б" CYRILLIC SMALL LETTER BE
- // U+043D: "н" CYRILLIC SMALL LETTER EN
- // U+043C: "м" CYRILLIC SMALL LETTER EM
- // U+0436: "ж" CYRILLIC SMALL LETTER ZHE
- .setLabelsOfRow(3,
+ .setKeysOfRow(3,
+ // U+045F: "џ" CYRILLIC SMALL LETTER DZHE
+ // U+0446: "ц" CYRILLIC SMALL LETTER TSE
+ // U+0432: "в" CYRILLIC SMALL LETTER VE
+ // U+0431: "б" CYRILLIC SMALL LETTER BE
+ // U+043D: "н" CYRILLIC SMALL LETTER EN
+ // U+043C: "м" CYRILLIC SMALL LETTER EM
+ // U+0436: "ж" CYRILLIC SMALL LETTER ZHE
ROW3_1, "\u045F", "\u0446", "\u0432", "\u0431", "\u043D", "\u043C", ROW3_8,
"\u0436")
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
index 5ccc364ca..9e6556089 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java
@@ -46,7 +46,7 @@ public final class Spanish extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")))
- .setLabelsOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10)
- .setLabelsOfRow(3, "z", "x", "c", "v", "b", "n", "m")
+ .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10)
+ .setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java b/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
index 5bc45d4cb..c6562e245 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java
@@ -48,8 +48,8 @@ public final class Swiss extends LayoutBase {
key("i", moreKey("8")),
key("o", moreKey("9")),
key("p", moreKey("0")),
- key(ROW1_11))
- .setLabelsOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
- .setLabelsOfRow(3, "y", "x", "c", "v", "b", "n", "m")
+ ROW1_11)
+ .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11)
+ .setKeysOfRow(3, "y", "x", "c", "v", "b", "n", "m")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
index 9ce418770..726fefc68 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java
@@ -46,7 +46,7 @@ public class Symbols extends AbstractLayoutBase {
.addKeysOnTheRightOfRow(4, key(ENTER_KEY, EMOJI_KEY));
} else {
// Tablet symbols keyboard has extra two keys at the left edge of the 3rd row.
- builder.addKeysOnTheLeftOfRow(3, joinKeys("\\", "="));
+ builder.addKeysOnTheLeftOfRow(3, (Object[])joinKeys("\\", "="));
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
.addKeysOnTheRightOfRow(2, ENTER_KEY)
.addKeysOnTheLeftOfRow(3, customizer.getSymbolsShiftKey(isPhone))
@@ -136,11 +136,10 @@ public class Symbols extends AbstractLayoutBase {
key("4", moreKey("\u2074")),
// U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS
key("5", moreKey("\u215D")),
- key("6"),
+ "6",
// U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS
key("7", moreKey("\u215E")),
- key("8"),
- key("9"),
+ "8", "9",
// U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N
// U+2205: "∅" EMPTY SET
key("0", joinMoreKeys("\u207F", "\u2205")))
@@ -148,7 +147,7 @@ public class Symbols extends AbstractLayoutBase {
key("@"), key("#"), key(CURRENCY),
// U+2030: "‰" PER MILLE SIGN
key("%", moreKey("\u2030")),
- key("&"),
+ "&",
// U+2013: "–" EN DASH
// U+2014: "—" EM DASH
// U+00B7: "·" MIDDLE DOT
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
index 7cbd2fbb0..f611310af 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java
@@ -34,7 +34,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
public ExpectedKey[][] getLayout(final boolean isPhone) {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(SYMBOLS_SHIFTED_COMMON);
final LayoutCustomizer customizer = mCustomizer;
- builder.replaceKeyOfLabel(OTHER_CURRENCIES, customizer.getOtherCurrencyKeys());
+ builder.replaceKeyOfLabel(OTHER_CURRENCIES, (Object[])customizer.getOtherCurrencyKeys());
if (isPhone) {
builder.addKeysOnTheLeftOfRow(3, customizer.getBackToSymbolsKey())
.addKeysOnTheRightOfRow(3, DELETE_KEY)
@@ -44,7 +44,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
// Tablet symbols shifted keyboard has extra two keys at the right edge of the 3rd row.
// U+00BF: "¿" INVERTED QUESTION MARK
// U+00A1: "¡" INVERTED EXCLAMATION MARK
- builder.addKeysOnTheRightOfRow(3, joinKeys("\u00A1", "\u00BF"));
+ builder.addKeysOnTheRightOfRow(3, (Object[])joinKeys("\u00A1", "\u00BF"));
builder.addKeysOnTheRightOfRow(1, DELETE_KEY)
.addKeysOnTheRightOfRow(2, ENTER_KEY)
.addKeysOnTheLeftOfRow(3, customizer.getBackToSymbolsKey())
@@ -72,10 +72,8 @@ public class SymbolsShifted extends AbstractLayoutBase {
// Common symbols shifted keyboard layout.
private static final ExpectedKey[][] SYMBOLS_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
- key("~"),
// U+0060: "`" GRAVE ACCENT
- key("\u0060"),
- key("|"),
+ "~", "\u0060", "|",
// U+2022: "•" BULLET
// U+266A: "♪" EIGHTH NOTE
// U+2665: "♥" BLACK HEART SUIT
@@ -84,21 +82,20 @@ public class SymbolsShifted extends AbstractLayoutBase {
// U+2663: "♣" BLACK CLUB SUIT
key("\u2022", joinMoreKeys("\u266A", "\u2665", "\u2660", "\u2666", "\u2663")),
// U+221A: "√" SQUARE ROOT
- key("\u221A"),
+ "\u221A",
// U+03C0: "π" GREEK SMALL LETTER PI
// U+03A0: "Π" GREEK CAPITAL LETTER PI
key("\u03C0", moreKey("\u03A0")),
// U+00F7: "÷" DIVISION SIGN
- key("\u00F7"),
// U+00D7: "×" MULTIPLICATION SIGN
- key("\u00D7"),
+ "\u00F7", "\u00D7",
// U+00B6: "¶" PILCROW SIGN
// U+00A7: "§" SECTION SIGN
key("\u00B6", moreKey("\u00A7")),
// U+2206: "∆" INCREMENT
- key("\u2206"))
+ "\u2206")
.setKeysOfRow(2,
- key(OTHER_CURRENCIES),
+ OTHER_CURRENCIES,
// U+2191: "↑" UPWARDS ARROW
// U+2193: "↓" DOWNWARDS ARROW
// U+2190: "←" LEFTWARDS ARROW
@@ -112,9 +109,8 @@ public class SymbolsShifted extends AbstractLayoutBase {
// U+2248: "≈" ALMOST EQUAL TO
// U+221E: "∞" INFINITY
key("=", joinMoreKeys("\u2260", "\u2248", "\u221E")),
- key("{"),
- key("}"))
- .setLabelsOfRow(3,
+ "{", "}")
+ .setKeysOfRow(3,
// U+00A9: "©" COPYRIGHT SIGN
// U+00AE: "®" REGISTERED SIGN
// U+2122: "™" TRADE MARK SIGN
@@ -129,7 +125,7 @@ public class SymbolsShifted extends AbstractLayoutBase {
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
key(">", joinMoreKeys("\u203A", "\u2265", "\u00BB")),
- SPACE_KEY, key(","),
+ SPACE_KEY, ",",
// U+2026: "…" HORIZONTAL ELLIPSIS
key(".", moreKey("\u2026")))
.build();
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
index 64081a138..253c93b83 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Thai.java
@@ -69,11 +69,11 @@ public final class Thai extends LayoutBase {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
if (isPhone) {
// U+0E03: "ฃ" THAI CHARACTER KHO KHUAT
- builder.addKeysOnTheRightOfRow(3, key("\u0E03"));
+ builder.addKeysOnTheRightOfRow(3, "\u0E03");
} else {
// U+0E03: "ฃ" THAI CHARACTER KHO KHUAT
- builder.addKeysOnTheRightOfRow(2, key("\u0E03"))
- .addKeysOnTheRightOfRow(4, EXCLAMATION_AND_QUESTION_MARKS);
+ builder.addKeysOnTheRightOfRow(2, "\u0E03")
+ .addKeysOnTheRightOfRow(4, (Object[])EXCLAMATION_AND_QUESTION_MARKS);
}
return builder.build();
}
@@ -88,10 +88,10 @@ public final class Thai extends LayoutBase {
ALPHABET_SHIFTED_COMMON);
if (isPhone) {
// U+0E05: "ฅ" THAI CHARACTER KHO KHON
- builder.addKeysOnTheRightOfRow(3, key("\u0E05"));
+ builder.addKeysOnTheRightOfRow(3, "\u0E05");
} else {
// U+0E05: "ฅ" THAI CHARACTER KHO KHON
- builder.addKeysOnTheRightOfRow(2, key("\u0E05"));
+ builder.addKeysOnTheRightOfRow(2, "\u0E05");
}
return builder.build();
}
@@ -101,11 +101,9 @@ public final class Thai extends LayoutBase {
ExpectedKeyboardBuilder convertCommonLayoutToKeyboard(final ExpectedKeyboardBuilder builder,
final boolean isPhone) {
final LayoutCustomizer customizer = getCustomizer();
- final ExpectedKey[] spacebar = joinKeys(
- customizer.getKeysLeftToSpacebar(isPhone),
- customizer.getSpaceKeys(isPhone),
- customizer.getKeysRightToSpacebar(isPhone));
- builder.setKeysOfRow(5, spacebar);
+ builder.setKeysOfRow(5, (Object[])customizer.getSpaceKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(5, (Object[])customizer.getKeysLeftToSpacebar(isPhone));
+ builder.addKeysOnTheRightOfRow(5, (Object[])customizer.getKeysRightToSpacebar(isPhone));
if (isPhone) {
builder.addKeysOnTheRightOfRow(4, DELETE_KEY)
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey())
@@ -116,15 +114,15 @@ public final class Thai extends LayoutBase {
.addKeysOnTheLeftOfRow(5, customizer.getSymbolsKey(), SETTINGS_KEY)
.addKeysOnTheRightOfRow(5, EMOJI_KEY);
}
- builder.addKeysOnTheLeftOfRow(4, customizer.getLeftShiftKeys(isPhone))
- .addKeysOnTheRightOfRow(4, customizer.getRightShiftKeys(isPhone));
+ builder.addKeysOnTheLeftOfRow(4, (Object[])customizer.getLeftShiftKeys(isPhone))
+ .addKeysOnTheRightOfRow(4, (Object[])customizer.getRightShiftKeys(isPhone));
return builder;
}
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+0E45: "ๅ" THAI CHARACTER LAKKHANGYAO
- key("\u0E45"),
+ "\u0E45",
// U+0E51: "๑" THAI DIGIT ONE
key("/", joinMoreKeys("1", "\u0E51")),
// U+0E52: "๒" THAI DIGIT TWO
@@ -159,160 +157,110 @@ public final class Thai extends LayoutBase {
// U+0E50: "๐" THAI DIGIT ZERO
key("\u0E46", joinMoreKeys("0", "\u0E50")),
// U+0E44: "ไ" THAI CHARACTER SARA AI MAIMALAI
- key("\u0E44"),
// U+0E33: "ำ" THAI CHARACTER SARA AM
- key("\u0E33"),
// U+0E1E: "พ" THAI CHARACTER PHO PHAN
- key("\u0E1E"),
// U+0E30: "ะ" THAI CHARACTER SARA A
- key("\u0E30"),
+ "\u0E44", "\u0E33", "\u0E1E", "\u0E30",
// U+0E31: " ั" THAI CHARACTER MAI HAN-AKAT
key(" \u0E31", "\u0E31"),
// U+0E35: " ี" HAI CHARACTER SARA II
key(" \u0E35", "\u0E35"),
// U+0E23: "ร" THAI CHARACTER RO RUA
- key("\u0E23"),
// U+0E19: "น" THAI CHARACTER NO NU
- key("\u0E19"),
// U+0E22: "ย" THAI CHARACTER YO YAK
- key("\u0E22"),
// U+0E1A: "บ" THAI CHARACTER BO BAIMAI
- key("\u0E1A"),
// U+0E25: "ล" THAI CHARACTER LO LING
- key("\u0E25"))
+ "\u0E23", "\u0E19", "\u0E22", "\u0E1A", "\u0E25")
.setKeysOfRow(3,
// U+0E1F: "ฟ" THAI CHARACTER FO FAN
- key("\u0E1F"),
// U+0E2B: "ห" THAI CHARACTER HO HIP
- key("\u0E2B"),
// U+0E01: "ก" THAI CHARACTER KO KAI
- key("\u0E01"),
// U+0E14: "ด" THAI CHARACTER DO DEK
- key("\u0E14"),
// U+0E40: "เ" THAI CHARACTER SARA E
- key("\u0E40"),
+ "\u0E1F", "\u0E2B", "\u0E01", "\u0E14", "\u0E40",
// U+0E49: " ้" THAI CHARACTER MAI THO
key(" \u0E49", "\u0E49"),
// U+0E48: " ่" THAI CHARACTER MAI EK
key(" \u0E48", "\u0E48"),
// U+0E32: "า" THAI CHARACTER SARA AA
- key("\u0E32"),
// U+0E2A: "ส" THAI CHARACTER SO SUA
- key("\u0E2A"),
// U+0E27: "ว" THAI CHARACTER WO WAEN
- key("\u0E27"),
// U+0E07: "ง" THAI CHARACTER NGO NGU
- key("\u0E07"))
+ "\u0E32", "\u0E2A", "\u0E27", "\u0E07")
.setKeysOfRow(4,
// U+0E1C: "ผ" THAI CHARACTER PHO PHUNG
- key("\u0E1C"),
// U+0E1B: "ป" THAI CHARACTER PO PLA
- key("\u0E1B"),
// U+0E41: "แ" THAI CHARACTER SARA AE
- key("\u0E41"),
// U+0E2D: "อ" THAI CHARACTER O ANG
- key("\u0E2D"),
+ "\u0E1C", "\u0E1B", "\u0E41", "\u0E2D",
// U+0E34: " ิ" THAI CHARACTER SARA I
key(" \u0E34", "\u0E34"),
// U+0E37: " ื" THAI CHARACTER SARA UEE
key(" \u0E37", "\u0E37"),
// U+0E17: "ท" THAI CHARACTER THO THAHAN
- key("\u0E17"),
// U+0E21: "ม" THAI CHARACTER MO MA
- key("\u0E21"),
// U+0E43: "ใ" THAI CHARACTER SARA AI MAIMUAN
- key("\u0E43"),
// U+0E1D: "ฝ" THAI CHARACTER FO FA
- key("\u0E1D"))
+ "\u0E17", "\u0E21", "\u0E43", "\u0E1D")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
- key("+"),
// U+0E51: "๑" THAI DIGIT ONE
- key("\u0E51"),
// U+0E52: "๒" THAI DIGIT TWO
- key("\u0E52"),
// U+0E53: "๓" THAI DIGIT THREE
- key("\u0E53"),
// U+0E54: "๔" THAI DIGIT FOUR
- key("\u0E54"),
// U+0E39: " ู" THAI CHARACTER SARA UU
+ "+", "\u0E51", "\u0E52", "\u0E53", "\u0E54",
key(" \u0E39", "\u0E39"),
// U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT
- key("\u0E3F"),
// U+0E55: "๕" THAI DIGIT FIVE
- key("\u0E55"),
// U+0E56: "๖" THAI DIGIT SIX
- key("\u0E56"),
// U+0E57: "๗" THAI DIGIT SEVEN
- key("\u0E57"),
// U+0E58: "๘" THAI DIGIT EIGHT
- key("\u0E58"),
// U+0E59: "๙" THAI DIGIT NINE
- key("\u0E59"))
+ "\u0E3F", "\u0E55", "\u0E56", "\u0E57", "\u0E58", "\u0E59")
.setKeysOfRow(2,
// U+0E50: "๐" THAI DIGIT ZERO
- key("\u0E50"),
- key("\""),
// U+0E0E: "ฎ" THAI CHARACTER DO CHADA
- key("\u0E0E"),
// U+0E11: "ฑ" THAI CHARACTER THO NANGMONTHO
- key("\u0E11"),
// U+0E18: "ธ" THAI CHARACTER THO THONG
- key("\u0E18"),
+ "\u0E50", "\"", "\u0E0E", "\u0E11", "\u0E18",
// U+0E4D: " ํ" THAI CHARACTER THANTHAKHAT
key(" \u0E4D", "\u0E4D"),
// U+0E4A: " ๊" THAI CHARACTER MAI TRI
key(" \u0E4A", "\u0E4A"),
// U+0E13: "ณ" THAI CHARACTER NO NEN
- key("\u0E13"),
// U+0E2F: "ฯ" THAI CHARACTER PAIYANNOI
- key("\u0E2F"),
// U+0E0D: "ญ" THAI CHARACTER YO YING
- key("\u0E0D"),
// U+0E10: "ฐ" THAI CHARACTER THO THAN
- key("\u0E10"),
- key(","))
+ "\u0E13", "\u0E2F", "\u0E0D", "\u0E10", ",")
.setKeysOfRow(3,
// U+0E24: "ฤ" THAI CHARACTER RU
- key("\u0E24"),
// U+0E06: "ฆ" THAI CHARACTER KHO RAKHANG
- key("\u0E06"),
// U+0E0F: "ฏ" THAI CHARACTER TO PATAK
- key("\u0E0F"),
// U+0E42: "โ" THAI CHARACTER SARA O
- key("\u0E42"),
// U+0E0C: "ฌ" THAI CHARACTER CHO CHOE
- key("\u0E0C"),
+ "\u0E24", "\u0E06", "\u0E0F", "\u0E42", "\u0E0C",
// U+0E47: " ็" THAI CHARACTER MAITAIKHU
key(" \u0E47", "\u0E47"),
// U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA
key(" \u0E4B", "\u0E4B"),
// U+0E29: "ษ" THAI CHARACTER SO RUSI
- key("\u0E29"),
// U+0E28: "ศ" THAI CHARACTER SO SALA
- key("\u0E28"),
// U+0E0B: "ซ" THAI CHARACTER SO SO
- key("\u0E0B"),
- key("."))
+ "\u0E29", "\u0E28", "\u0E0B", ".")
.setKeysOfRow(4,
- key("("),
- key(")"),
// U+0E09: "ฉ" THAI CHARACTER CHO CHING
- key("\u0E09"),
// U+0E2E: "ฮ" THAI CHARACTER HO NOKHUK
- key("\u0E2E"),
+ "(", ")", "\u0E09", "\u0E2E",
// U+0E3A: " ฺ" THAI CHARACTER PHINTHU
key(" \u0E3A", "\u0E3A"),
// U+0E4C: " ์" THAI CHARACTER THANTHAKHAT
key(" \u0E4C", "\u0E4C"),
- key("?"),
// U+0E12: "ฒ" THAI CHARACTER THO PHUTHAO
- key("\u0E12"),
// U+0E2C: "ฬ" THAI CHARACTER LO CHULA
- key("\u0E2C"),
// U+0E26: "ฦ" THAI CHARACTER LU
- key("\u0E26"))
+ "?", "\u0E12", "\u0E2C", "\u0E26")
.build();
}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
index 61cadfcad..f9427bc2d 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java
@@ -18,12 +18,8 @@ package com.android.inputmethod.keyboard.layout.expected;
import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
import com.android.inputmethod.latin.Constants;
-import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.StringUtils;
-import java.util.ArrayList;
-import java.util.Arrays;
-
/**
* Base class to create an expected keyboard for unit test.
*/
@@ -97,19 +93,7 @@ public abstract class AbstractLayoutBase {
// Helper method to create {@link ExpectedKey} array by joining {@link ExpectedKey},
// {@link ExpectedKey} array, and {@link String}.
public static ExpectedKey[] joinKeys(final Object ... keys) {
- final ArrayList<ExpectedKey> list = CollectionUtils.newArrayList();
- for (final Object key : keys) {
- if (key instanceof ExpectedKey) {
- list.add((ExpectedKey)key);
- } else if (key instanceof ExpectedKey[]) {
- list.addAll(Arrays.asList((ExpectedKey[])key));
- } else if (key instanceof String) {
- list.add(key((String)key));
- } else {
- throw new RuntimeException("Unknown expected key type: " + key);
- }
- }
- return list.toArray(new ExpectedKey[list.size()]);
+ return ExpectedKeyboardBuilder.joinKeys(keys);
}
// Icon ids.
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java
index 176e0eb92..c73fbf7b2 100644
--- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java
+++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java
@@ -16,6 +16,9 @@
package com.android.inputmethod.keyboard.layout.expected;
+import com.android.inputmethod.latin.utils.CollectionUtils;
+
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
@@ -105,67 +108,57 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
}
}
- /**
- * Set the row with specified keys that have specified labels.
- * @param row the row number to set keys.
- * @param labels the label texts of the keys.
- * @return this builder.
- */
- public ExpectedKeyboardBuilder setLabelsOfRow(final int row, final String ... labels) {
- final ExpectedKey[] keys = new ExpectedKey[labels.length];
- for (int columnIndex = 0; columnIndex < labels.length; columnIndex++) {
- keys[columnIndex] = ExpectedKey.newInstance(labels[columnIndex]);
+ // Helper method to create {@link ExpectedKey} array by joining {@link ExpectedKey},
+ // {@link ExpectedKey} array, and {@link String}.
+ static ExpectedKey[] joinKeys(final Object ... keys) {
+ final ArrayList<ExpectedKey> list = CollectionUtils.newArrayList();
+ for (final Object key : keys) {
+ if (key instanceof ExpectedKey) {
+ list.add((ExpectedKey)key);
+ } else if (key instanceof ExpectedKey[]) {
+ list.addAll(Arrays.asList((ExpectedKey[])key));
+ } else if (key instanceof String) {
+ list.add(ExpectedKey.newInstance((String)key));
+ } else {
+ throw new RuntimeException("Unknown expected key type: " + key);
+ }
}
- setRowAt(row, keys);
- return this;
+ return list.toArray(new ExpectedKey[list.size()]);
}
/**
* Set the row with specified keys.
* @param row the row number to set keys.
- * @param keys the keys to be set at <code>row</code>.
- * @return this builder.
- */
- public ExpectedKeyboardBuilder setKeysOfRow(final int row, final ExpectedKey ... keys) {
- setRowAt(row, keys);
- return this;
- }
-
- /**
- * Set the "more keys" of the key that has the specified label.
- * @param label the label of the key to set the "more keys".
- * @param moreKeys the array of labels of the "more keys" to be set.
+ * @param keys the keys to be set at <code>row</code>. Each key can be {@link ExpectedKey},
+ * {@link ExpectedKey} array, and {@link String}.
* @return this builder.
*/
- public ExpectedKeyboardBuilder setMoreKeysOf(final String label, final String ... moreKeys) {
- final ExpectedKey[] expectedMoreKeys = new ExpectedKey[moreKeys.length];
- for (int index = 0; index < moreKeys.length; index++) {
- expectedMoreKeys[index] = ExpectedKey.newInstance(moreKeys[index]);
- }
- setMoreKeysOf(label, expectedMoreKeys);
+ public ExpectedKeyboardBuilder setKeysOfRow(final int row, final Object ... keys) {
+ setRowAt(row, joinKeys(keys));
return this;
}
/**
* Set the "more keys" of the key that has the specified label.
* @param label the label of the key to set the "more keys".
- * @param moreKeys the array of "more key" to be set.
+ * @param moreKeys the array of "more key" to be set. Each "more key" can be
+ * {@link ExpectedKey}, {@link ExpectedKey} array, and {@link String}.
* @return this builder.
*/
- public ExpectedKeyboardBuilder setMoreKeysOf(final String label,
- final ExpectedKey ... moreKeys) {
- setMoreKeysOf(ExpectedKeyVisual.newInstance(label), moreKeys);
+ public ExpectedKeyboardBuilder setMoreKeysOf(final String label, final Object ... moreKeys) {
+ setMoreKeysOf(ExpectedKeyVisual.newInstance(label), joinKeys(moreKeys));
return this;
}
/**
* Set the "more keys" of the key that has the specified icon.
* @param iconId the icon id of the key to set the "more keys".
- * @param moreKeys the array of "more key" to be set.
+ * @param moreKeys the array of "more key" to be set. Each "more key" can be
+ * {@link ExpectedKey}, {@link ExpectedKey} array, and {@link String}.
* @return this builder.
*/
- public ExpectedKeyboardBuilder setMoreKeysOf(final int iconId, final ExpectedKey ... moreKeys) {
- setMoreKeysOf(ExpectedKeyVisual.newInstance(iconId), moreKeys);
+ public ExpectedKeyboardBuilder setMoreKeysOf(final int iconId, final Object ... moreKeys) {
+ setMoreKeysOf(ExpectedKeyVisual.newInstance(iconId), joinKeys(moreKeys));
return this;
}
@@ -188,14 +181,16 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
* Insert the keys at specified position.
* @param row the row number to insert the <code>keys</code>.
* @param column the column number to insert the <code>keys</code>.
- * @param keys the array of keys to insert at <code>row,column</code>.
+ * @param keys the array of keys to insert at <code>row,column</code>. Each key can be
+ * {@link ExpectedKey}, {@link ExpectedKey} array, and {@link String}.
* @return this builder.
* @throws {@link RuntimeException} if <code>row</code> or <code>column</code> is illegal.
*/
public ExpectedKeyboardBuilder insertKeysAtRow(final int row, final int column,
- final ExpectedKey ... keys) {
+ final Object ... keys) {
+ final ExpectedKey[] expectedKeys = joinKeys(keys);
for (int index = 0; index < keys.length; index++) {
- setElementAt(row, column + index, keys[index], true /* insert */);
+ setElementAt(row, column + index, expectedKeys[index], true /* insert */);
}
return this;
}
@@ -203,15 +198,17 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
/**
* Add the keys on the left most of the row.
* @param row the row number to add the <code>keys</code>.
- * @param keys the array of keys to add on the left most of the row.
+ * @param keys the array of keys to add on the left most of the row. Each key can be
+ * {@link ExpectedKey}, {@link ExpectedKey} array, and {@link String}.
* @return this builder.
* @throws {@link RuntimeException} if <code>row</code> is illegal.
*/
public ExpectedKeyboardBuilder addKeysOnTheLeftOfRow(final int row,
- final ExpectedKey ... keys) {
+ final Object ... keys) {
+ final ExpectedKey[] expectedKeys = joinKeys(keys);
// Keys should be inserted from the last to preserve the order.
for (int index = keys.length - 1; index >= 0; index--) {
- setElementAt(row, 1, keys[index], true /* insert */);
+ setElementAt(row, 1, expectedKeys[index], true /* insert */);
}
return this;
}
@@ -219,12 +216,13 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
/**
* Add the keys on the right most of the row.
* @param row the row number to add the <code>keys</code>.
- * @param keys the array of keys to add on the right most of the row.
+ * @param keys the array of keys to add on the right most of the row. Each key can be
+ * {@link ExpectedKey}, {@link ExpectedKey} array, and {@link String}.
* @return this builder.
* @throws {@link RuntimeException} if <code>row</code> is illegal.
*/
public ExpectedKeyboardBuilder addKeysOnTheRightOfRow(final int row,
- final ExpectedKey ... keys) {
+ final Object ... keys) {
final int rightEnd = getRowAt(row).length + 1;
insertKeysAtRow(row, rightEnd, keys);
return this;
@@ -233,16 +231,17 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
/**
* Replace the most top-left key that has the specified label with the new keys.
* @param label the label of the key to set <code>newKeys</code>.
- * @param newKeys the keys to be set.
+ * @param newKeys the keys to be set. Each key can be {@link ExpectedKey}, {@link ExpectedKey}
+ * array, and {@link String}.
* @return this builder.
*/
public ExpectedKeyboardBuilder replaceKeyOfLabel(final String label,
- final ExpectedKey ... newKeys) {
+ final Object ... newKeys) {
final ExpectedKeyVisual visual = ExpectedKeyVisual.newInstance(label);
replaceKeyOf(visual, new ReplaceJob() {
@Override
public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) {
- return newKeys;
+ return joinKeys(newKeys);
}
@Override
public boolean stopAtFirstOccurrence() {
@@ -255,15 +254,16 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec
/**
* Replace the all specified keys with the new keys.
* @param key the key to be replaced by <code>newKeys</code>.
- * @param newKeys the keys to be set.
+ * @param newKeys the keys to be set. Each key can be {@link ExpectedKey}, {@link ExpectedKey}
+ * array, and {@link String}.
* @return this builder.
*/
public ExpectedKeyboardBuilder replaceKeysOfAll(final ExpectedKey key,
- final ExpectedKey ... newKeys) {
+ final Object ... newKeys) {
replaceKeyOf(key.getVisual(), new ReplaceJob() {
@Override
public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) {
- return newKeys;
+ return joinKeys(newKeys);
}
@Override
public boolean stopAtFirstOccurrence() {
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 000000000..16a0bc41a
--- /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>