diff options
99 files changed, 2491 insertions, 1675 deletions
diff --git a/java/res/xml-sw600dp/key_colemak_colon.xml b/java/res/xml-sw600dp/key_colemak_colon.xml deleted file mode 100644 index 25b0e52b8..000000000 --- a/java/res/xml-sw600dp/key_colemak_colon.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Key - latin:keySpec=":" - latin:keyHintLabel=";" - latin:moreKeys=";" - latin:keyStyle="hasShiftedLetterHintStyle" /> -</merge> diff --git a/java/res/xml-sw600dp/key_styles_enter.xml b/java/res/xml-sw600dp/key_styles_enter.xml index 38a38fd45..05762ad14 100644 --- a/java/res/xml-sw600dp/key_styles_enter.xml +++ b/java/res/xml-sw600dp/key_styles_enter.xml @@ -112,7 +112,7 @@ > <key-style latin:styleName="enterKeyStyle" - latin:keySpec="!text/label_go_key|!code/key_shift_enter" + latin:keySpec="!icon/enter_key|!code/key_shift_enter" latin:parentStyle="defaultEnterKeyStyle" /> </case> <case diff --git a/java/res/xml-sw600dp/row_pcqwerty5.xml b/java/res/xml-sw600dp/row_pcqwerty5.xml index b854f1051..52b581ae6 100644 --- a/java/res/xml-sw600dp/row_pcqwerty5.xml +++ b/java/res/xml-sw600dp/row_pcqwerty5.xml @@ -24,37 +24,32 @@ <Row latin:keyWidth="7.0%p" > + <include + latin:keyWidth="9.0%p" + latin:keyboardLayout="@xml/key_shortcut" /> <switch> <case latin:languageSwitchKeyEnabled="true" > <Key latin:keyStyle="languageSwitchKeyStyle" - latin:keyWidth="9.0%p" - latin:backgroundType="functional" /> - </case> - </switch> - <Key - latin:keyStyle="spaceKeyStyle" - latin:keyXPos="25.5%p" - latin:keyWidth="49.0%p" /> - <switch> - <case - latin:keyboardLayoutSetElement="alphabet|alphabetAutomaticShifted" - > - <include - latin:keyXPos="-9.0%p" - latin:keyWidth="9.0%p" - latin:keyboardLayout="@xml/key_shortcut" /> + latin:keyXPos="22.0%p" + latin:keyWidth="9.0%p" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyWidth="40.0%p" /> </case> - <!-- keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" --> <default> - <include - latin:keyXPos="-9.0%p" - latin:keyWidth="9.0%p" - latin:backgroundType="functional" - latin:keyboardLayout="@xml/key_f2" /> + <Key + latin:keyStyle="spaceKeyStyle" + latin:keyXPos="29.0%p" + latin:keyWidth="42.0%p" /> </default> </switch> + <include + latin:keyXPos="-9.0%p" + latin:keyWidth="9.0%p" + latin:backgroundType="functional" + latin:keyboardLayout="@xml/key_f2" /> </Row> </merge> diff --git a/java/res/xml-sw600dp/rows_colemak.xml b/java/res/xml-sw600dp/rows_colemak.xml index ab059da83..7559bfb96 100644 --- a/java/res/xml-sw600dp/rows_colemak.xml +++ b/java/res/xml-sw600dp/rows_colemak.xml @@ -28,8 +28,6 @@ > <include latin:keyboardLayout="@xml/rowkeys_colemak1" /> - <include - latin:keyboardLayout="@xml/key_colemak_colon" /> <Key latin:keyStyle="deleteKeyStyle" latin:keyWidth="fillRight" /> diff --git a/java/res/xml-sw600dp/rows_pcqwerty.xml b/java/res/xml-sw600dp/rows_pcqwerty.xml index 8714815ef..b503d839d 100644 --- a/java/res/xml-sw600dp/rows_pcqwerty.xml +++ b/java/res/xml-sw600dp/rows_pcqwerty.xml @@ -56,7 +56,7 @@ latin:keyWidth="7.0%p" > <Spacer - latin:keyWidth="12.0%p" /> + latin:keyWidth="10.0%p" /> <include latin:keyboardLayout="@xml/rowkeys_pcqwerty3" /> <Key diff --git a/java/res/xml/key_colemak_colon.xml b/java/res/xml/key_colemak_colon.xml deleted file mode 100644 index 9330be9a5..000000000 --- a/java/res/xml/key_colemak_colon.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <switch> - <case - latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted" - > - <Key - latin:keySpec=";" - latin:keyHintLabel="0" - latin:additionalMoreKeys="0" /> - </case> - <default> - <Key - latin:keySpec=":" - latin:keyHintLabel="0" - latin:additionalMoreKeys="0" - latin:moreKeys=";" /> - </default> - </switch> -</merge> diff --git a/java/res/xml/key_styles_currency.xml b/java/res/xml/key_styles_currency.xml index ed40ebc58..0888cc357 100644 --- a/java/res/xml/key_styles_currency.xml +++ b/java/res/xml/key_styles_currency.xml @@ -50,7 +50,7 @@ 19. San Marino (it_SM) 20. Slovakia (sk_SK) 21. Slovenia (sl_SI) - 22. Spain (es_ES, ca_ES) + 22. Spain (es_ES, ca_ES, eu_ES, gl_ES) 23. Vatican City (it_VA) --> <case latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA" diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 49b0df17b..c64b3a4e0 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -41,11 +41,13 @@ es_US: Spanish (United States)/spanish (es_419: Spanish (Latin America)/qwerty) et_EE: Estonian (Estonia)/nordic + eu_ES: Basque (Spain)/spanish fa: Persian/farsi fi: Finnish/nordic fr: French/azerty fr_CA: French (Canada)/qwerty fr_CH: French (Switzerland)/swiss + gl_ES: Galician (Spain)/spanish hi: Hindi/hindi hr: Croatian/qwertz hu: Hungarian/qwertz @@ -256,6 +258,14 @@ /> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" + android:subtypeId="0x070e5c07" + android:imeSubtypeLocale="eu_ES" + android:imeSubtypeMode="keyboard" + android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable" + android:isAsciiCapable="true" + /> + <subtype android:icon="@drawable/ic_ime_switcher_dark" + android:label="@string/subtype_generic" android:subtypeId="0xbe66c254" android:imeSubtypeLocale="fa" android:imeSubtypeMode="keyboard" @@ -296,6 +306,14 @@ /> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" + android:subtypeId="0xb939573c" + android:imeSubtypeLocale="gl_ES" + android:imeSubtypeMode="keyboard" + android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable" + android:isAsciiCapable="true" + /> + <subtype android:icon="@drawable/ic_ime_switcher_dark" + android:label="@string/subtype_generic" android:subtypeId="0x39753b7f" android:imeSubtypeLocale="hi" android:imeSubtypeMode="keyboard" diff --git a/java/res/xml/row_pcqwerty5.xml b/java/res/xml/row_pcqwerty5.xml index f6438ab0f..3782763a8 100644 --- a/java/res/xml/row_pcqwerty5.xml +++ b/java/res/xml/row_pcqwerty5.xml @@ -24,23 +24,21 @@ <Row latin:keyWidth="7.692%p" > - <Spacer - latin:keyWidth="11.538%p" /> <switch> <case - latin:supportsSwitchingToShortcutIme="true" + latin:hasShortcutKey="true" > <Key latin:keyStyle="shortcutKeyStyle" latin:keyWidth="11.538%p" /> - </case> + </case> <case latin:clobberSettingsKey="false" > <Key latin:keyStyle="settingsKeyStyle" latin:keyWidth="11.538%p" /> - </case> + </case> </switch> <switch> <case @@ -48,24 +46,23 @@ > <Key latin:keyStyle="languageSwitchKeyStyle" + latin:keyXPos="19.231%p" latin:keyWidth="11.538%p" /> <Key latin:keyStyle="spaceKeyStyle" - latin:keyWidth="38.464%p" /> - </case> + latin:keyWidth="42.308%p" /> + </case> <!-- languageSwitchKeyEnabled="false" --> <default> <Key latin:keyStyle="spaceKeyStyle" - latin:keyWidth="50.002%p" /> + latin:keyXPos="26.923%p" + latin:keyWidth="46.154%p" /> </default> </switch> <Key - latin:keyStyle="defaultEnterKeyStyle" - latin:keySpec="!icon/enter_key|!code/key_enter" - latin:keyWidth="15.384%p" /> - <Key - latin:keyStyle="emojiKeyStyle" + latin:keyStyle="enterKeyStyle" + latin:keyXPos="-19.231%p" latin:keyWidth="fillRight" /> </Row> </merge> diff --git a/java/res/xml/rowkeys_colemak1.xml b/java/res/xml/rowkeys_colemak1.xml index 819a69d2b..2f2ade4d3 100644 --- a/java/res/xml/rowkeys_colemak1.xml +++ b/java/res/xml/rowkeys_colemak1.xml @@ -63,4 +63,21 @@ latin:keyHintLabel="9" latin:additionalMoreKeys="9" latin:moreKeys="!text/more_keys_for_y" /> + <switch> + <case + latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted" + > + <Key + latin:keySpec=":" + latin:keyHintLabel="0" + latin:additionalMoreKeys="0" /> + </case> + <default> + <Key + latin:keySpec=";" + latin:keyHintLabel="0" + latin:additionalMoreKeys="0" + latin:moreKeys=":" /> + </default> + </switch> </merge> diff --git a/java/res/xml/rowkeys_pcqwerty1_shift.xml b/java/res/xml/rowkeys_pcqwerty1_shift.xml index b9597c066..6a5f00c4f 100644 --- a/java/res/xml/rowkeys_pcqwerty1_shift.xml +++ b/java/res/xml/rowkeys_pcqwerty1_shift.xml @@ -49,12 +49,11 @@ latin:keySpec=")" /> <Key latin:keySpec="_" /> - <!-- U+00B1: "±" PLUS-MINUS SIGN - U+00D7: "×" MULTIPLICATION SIGN + <!-- U+00D7: "×" MULTIPLICATION SIGN U+00F7: "÷" DIVISION SIGN U+221A: "√" SQUARE ROOT --> <Key latin:keySpec="+" latin:additionalMoreKeys="!text/more_keys_for_plus" - latin:moreKeys="±,×,÷,√" /> + latin:moreKeys="×,÷,√" /> </merge> diff --git a/java/res/xml/rows_colemak.xml b/java/res/xml/rows_colemak.xml index d74c2c9ec..ec553c244 100644 --- a/java/res/xml/rows_colemak.xml +++ b/java/res/xml/rows_colemak.xml @@ -28,8 +28,6 @@ > <include latin:keyboardLayout="@xml/rowkeys_colemak1" /> - <include - latin:keyboardLayout="@xml/key_colemak_colon" /> </Row> <Row latin:keyWidth="10%p" diff --git a/java/src/com/android/inputmethod/event/Event.java b/java/src/com/android/inputmethod/event/Event.java index 41bf36b36..bd4143d25 100644 --- a/java/src/com/android/inputmethod/event/Event.java +++ b/java/src/com/android/inputmethod/event/Event.java @@ -17,6 +17,7 @@ package com.android.inputmethod.event; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; /** * Class representing a generic input event as handled by Latin IME. @@ -49,6 +50,8 @@ public class Event { final public static int EVENT_MODE_KEY = 3; // An event corresponding to a gesture. final public static int EVENT_GESTURE = 4; + // An event corresponding to the manual pick of a suggestion. + final public static int EVENT_SUGGESTION_PICKED = 5; // 0 is a valid code point, so we use -1 here. final public static int NOT_A_CODE_POINT = -1; @@ -85,31 +88,50 @@ public class Event { // Some flags that can't go into the key code. It's a bit field of FLAG_* final private int mFlags; + // If this is of type EVENT_SUGGESTION_PICKED, this must not be null (and must be null in + // other cases). + final public SuggestedWordInfo mSuggestedWordInfo; + // The next event, if any. Null if there is no next event yet. final public Event mNextEvent; // This method is private - to create a new event, use one of the create* utility methods. private Event(final int type, final int codePoint, final int keyCode, final int x, final int y, - final int flags, final Event next) { + final SuggestedWordInfo suggestedWordInfo, final int flags, final Event next) { mType = type; mCodePoint = codePoint; mKeyCode = keyCode; mX = x; mY = y; + mSuggestedWordInfo = suggestedWordInfo; mFlags = flags; mNextEvent = next; + // Sanity checks + // mSuggestedWordInfo is non-null if and only if the type is SUGGESTION_PICKED + if (EVENT_SUGGESTION_PICKED == mType) { + if (null == mSuggestedWordInfo) { + throw new RuntimeException("Wrong event: SUGGESTION_PICKED event must have a " + + "non-null SuggestedWordInfo"); + } + } else { + if (null != mSuggestedWordInfo) { + throw new RuntimeException("Wrong event: only SUGGESTION_PICKED events may have " + + "a non-null SuggestedWordInfo"); + } + } } public static Event createSoftwareKeypressEvent(final int codePoint, final int keyCode, final int x, final int y) { - return new Event(EVENT_INPUT_KEYPRESS, codePoint, keyCode, x, y, FLAG_NONE, null); + return new Event(EVENT_INPUT_KEYPRESS, codePoint, keyCode, x, y, + null /* suggestedWordInfo */, FLAG_NONE, null); } public static Event createHardwareKeypressEvent(final int codePoint, final int keyCode, final Event next) { return new Event(EVENT_INPUT_KEYPRESS, codePoint, keyCode, Constants.EXTERNAL_KEYBOARD_COORDINATE, Constants.EXTERNAL_KEYBOARD_COORDINATE, - FLAG_NONE, next); + null /* suggestedWordInfo */, FLAG_NONE, next); } // This creates an input event for a dead character. @see {@link #FLAG_DEAD} @@ -117,7 +139,7 @@ public class Event { // TODO: add an argument or something if we ever create a software layout with dead keys. return new Event(EVENT_INPUT_KEYPRESS, codePoint, keyCode, Constants.EXTERNAL_KEYBOARD_COORDINATE, Constants.EXTERNAL_KEYBOARD_COORDINATE, - FLAG_DEAD, next); + null /* suggestedWordInfo */, FLAG_DEAD, next); } /** @@ -130,7 +152,8 @@ public class Event { public static Event createEventForCodePointFromUnknownSource(final int codePoint) { // TODO: should we have a different type of event for this? After all, it's not a key press. return new Event(EVENT_INPUT_KEYPRESS, codePoint, NOT_A_KEY_CODE, - Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, FLAG_NONE, null /* next */); + Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, + null /* suggestedWordInfo */, FLAG_NONE, null /* next */); } /** @@ -144,13 +167,24 @@ public class Event { public static Event createEventForCodePointFromAlreadyTypedText(final int codePoint, final int x, final int y) { // TODO: should we have a different type of event for this? After all, it's not a key press. - return new Event(EVENT_INPUT_KEYPRESS, codePoint, NOT_A_KEY_CODE, x, y, FLAG_NONE, - null /* next */); + return new Event(EVENT_INPUT_KEYPRESS, codePoint, NOT_A_KEY_CODE, x, y, + null /* suggestedWordInfo */, FLAG_NONE, null /* next */); + } + + /** + * Creates an input event representing the manual pick of a suggestion. + * @return an event for this suggestion pick. + */ + public static Event createSuggestionPickedEvent(final SuggestedWordInfo suggestedWordInfo) { + return new Event(EVENT_SUGGESTION_PICKED, NOT_A_CODE_POINT, NOT_A_KEY_CODE, + Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE, + suggestedWordInfo, FLAG_NONE, null); } public static Event createNotHandledEvent() { return new Event(EVENT_NOT_HANDLED, NOT_A_CODE_POINT, NOT_A_KEY_CODE, - Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, FLAG_NONE, null); + Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, + null /* suggestedWordInfo */, FLAG_NONE, null); } // Returns whether this event is for a dead character. @see {@link #FLAG_DEAD} diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index e9ecd1e67..2ac51de32 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -79,17 +79,17 @@ public final class KeyboardTextsTable { private static final String[] NAMES = { // /* index:histogram */ "name", - /* 0:30 */ "more_keys_for_a", - /* 1:30 */ "more_keys_for_o", - /* 2:28 */ "more_keys_for_u", - /* 3:27 */ "more_keys_for_e", - /* 4:26 */ "more_keys_for_i", - /* 5:23 */ "double_quotes", - /* 6:22 */ "single_quotes", - /* 7:21 */ "more_keys_for_c", - /* 8:21 */ "label_to_alpha_key", - /* 9:20 */ "more_keys_for_s", - /* 10:20 */ "more_keys_for_n", + /* 0:32 */ "more_keys_for_a", + /* 1:32 */ "more_keys_for_o", + /* 2:30 */ "more_keys_for_u", + /* 3:29 */ "more_keys_for_e", + /* 4:28 */ "more_keys_for_i", + /* 5:23 */ "more_keys_for_c", + /* 6:23 */ "double_quotes", + /* 7:22 */ "more_keys_for_n", + /* 8:22 */ "single_quotes", + /* 9:21 */ "label_to_alpha_key", + /* 10:20 */ "more_keys_for_s", /* 11:14 */ "more_keys_for_y", /* 12:13 */ "more_keys_for_d", /* 13:12 */ "more_keys_for_z", @@ -256,15 +256,15 @@ public final class KeyboardTextsTable { /* Default texts */ private static final String[] LANGUAGE_DEFAULT = { /* more_keys_for_a ~ */ - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, - /* ~ more_keys_for_i */ + EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_lqm_rqm", + /* more_keys_for_n */ EMPTY, /* single_quotes */ "!text/single_lqm_rqm", - /* more_keys_for_c */ EMPTY, // Label for "switch to alphabetic" key. /* label_to_alpha_key */ "ABC", /* more_keys_for_s ~ */ - EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, 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", @@ -505,12 +505,14 @@ public final class KeyboardTextsTable { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // 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, - /* ~ more_keys_for_s */ + /* more_keys_for_c */ null, + /* double_quotes */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE /* more_keys_for_n */ "\u00F1,\u0144", + /* single_quotes ~ */ + null, null, null, + /* ~ more_keys_for_s */ // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0133: "ij" LATIN SMALL LIGATURE IJ /* more_keys_for_y */ "\u00FD,\u0133", @@ -519,8 +521,8 @@ 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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+0623: "أ" ARABIC LETTER ALEF WITH HAMZA ABOVE // U+200C: ZERO WIDTH NON-JOINER @@ -529,7 +531,7 @@ public final class KeyboardTextsTable { /* label_to_alpha_key */ "\u0623\u200C\u0628\u200C\u062C", /* 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, /* ~ more_keys_for_cyrillic_soft_sign */ /* more_keys_for_punctuation */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(", /* more_keys_for_nordic_row2_11 */ null, @@ -677,20 +679,20 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, + /* double_quotes ~ */ + null, null, null, null, + /* ~ label_to_alpha_key */ // 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, + /* more_keys_for_y ~ */ + null, null, null, null, null, /* ~ more_keys_for_l */ // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE /* more_keys_for_g */ "\u011F", @@ -699,18 +701,18 @@ public final class KeyboardTextsTable { /* Language be_BY: Belarusian (Belarus) */ private static final String[] LANGUAGE_be_BY = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* 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_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, /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", @@ -732,12 +734,12 @@ public final class KeyboardTextsTable { /* Language bg: Bulgarian */ private static final String[] LANGUAGE_bg = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ // single_quotes of Bulgarian is default single_quotes_right_left. /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* 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 @@ -789,19 +791,16 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, + /* double_quotes */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE /* more_keys_for_n */ "\u00F1,\u0144", - /* more_keys_for_y ~ */ - null, null, null, null, + /* single_quotes ~ */ + null, null, null, null, null, null, null, /* ~ more_keys_for_t */ // U+00B7: "·" MIDDLE DOT // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE @@ -870,21 +869,21 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u00E7,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u0148,\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_lqm", /* 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 /* more_keys_for_s */ "\u0161,\u00DF,\u015B", - // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u0148,\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -933,17 +932,17 @@ public final class KeyboardTextsTable { // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS /* more_keys_for_i */ "\u00ED,\u00EF", + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_lqm", + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", /* 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 /* more_keys_for_s */ "\u00DF,\u015B,\u0161", - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -1007,17 +1006,17 @@ public final class KeyboardTextsTable { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0117", /* more_keys_for_i */ null, + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_lqm", + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", /* 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 /* more_keys_for_s */ "\u00DF,\u015B,\u0161", - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u00F1,\u0144", /* more_keys_for_y ~ */ null, null, null, null, null, null, /* ~ more_keys_for_g */ @@ -1047,8 +1046,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+0391: "Α" GREEK CAPITAL LETTER ALPHA // U+0392: "Β" GREEK CAPITAL LETTER BETA @@ -1094,15 +1093,15 @@ public final class KeyboardTextsTable { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* more_keys_for_c */ "\u00E7", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* more_keys_for_n */ "\u00F1", + /* single_quotes */ null, /* 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", }; /* Language eo: Esperanto */ @@ -1160,20 +1159,12 @@ public final class KeyboardTextsTable { // U+0131: "ı" LATIN SMALL LETTER DOTLESS I // U+0133: "ij" LATIN SMALL LIGATURE IJ /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u0129,\u00EC,\u012F,\u012B,\u0131,\u0133", - /* double_quotes */ null, - /* single_quotes */ null, // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+010D: "č" LATIN SMALL LETTER C WITH CARON // 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 - // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW - // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - /* more_keys_for_s */ "\u00DF,\u0161,\u015B,\u0219,\u015F", + /* double_quotes */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA @@ -1181,6 +1172,14 @@ 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", + /* single_quotes */ null, + /* 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 + // U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW + // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA + /* more_keys_for_s */ "\u00DF,\u0161,\u015B,\u0219,\u015F", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -1301,20 +1300,17 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, + /* double_quotes */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE /* more_keys_for_n */ "\u00F1,\u0144", - /* more_keys_for_y ~ */ + /* single_quotes ~ */ null, null, null, null, null, null, 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 @@ -1368,22 +1364,22 @@ public final class KeyboardTextsTable { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I /* more_keys_for_i */ "\u012B,\u00EC,\u012F,\u00ED,\u00EE,\u00EF,\u0131", - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u00E7,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_lqm", /* 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 // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u0146,\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -1424,11 +1420,65 @@ public final class KeyboardTextsTable { /* more_keys_for_nordic_row2_10 */ "\u00F5", }; + /* Language eu_ES: Basque (Spain) */ + private static final String[] LANGUAGE_eu_ES = { + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + /* more_keys_for_o */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", + }; + /* Language fa: Persian */ private static final String[] LANGUAGE_fa = { /* more_keys_for_a ~ */ - null, null, null, null, null, null, null, null, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+0627: "ا" ARABIC LETTER ALEF // U+200C: ZERO WIDTH NON-JOINER @@ -1436,7 +1486,7 @@ public final class KeyboardTextsTable { // U+067E: "پ" ARABIC LETTER PEH /* label_to_alpha_key */ "\u0627\u200C\u0628\u200C\u067E", /* more_keys_for_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+FDFC: "﷼" RIAL SIGN /* keylabel_for_currency */ "\uFDFC", @@ -1590,15 +1640,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, null, + null, 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, - /* ~ more_keys_for_d */ + /* more_keys_for_y */ null, + /* more_keys_for_d */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE @@ -1664,15 +1713,13 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00EE,%,\u00EF,\u00EC,\u00ED,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, null, null, - /* ~ more_keys_for_n */ + /* more_keys_for_c */ "\u00E7,%,\u0107,\u010D", + /* double_quotes ~ */ + null, null, null, null, null, + /* ~ more_keys_for_s */ // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "%,\u00FF", /* more_keys_for_d ~ */ @@ -1696,18 +1743,72 @@ public final class KeyboardTextsTable { /* more_keys_for_swiss_row2_11 */ "\u00E4", }; + /* Language gl_ES: Gallegan (Spain) */ + private static final String[] LANGUAGE_gl_ES = { + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + /* more_keys_for_a */ "\u00E1,\u00E0,\u00E4,\u00E2,\u00E3,\u00E5,\u0105,\u00E6,\u0101,\u00AA", + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + /* more_keys_for_o */ "\u00F3,\u00F2,\u00F6,\u00F4,\u00F5,\u00F8,\u0153,\u014D,\u00BA", + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + /* more_keys_for_u */ "\u00FA,\u00FC,\u00F9,\u00FB,\u016B", + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + /* more_keys_for_e */ "\u00E9,\u00E8,\u00EB,\u00EA,\u0119,\u0117,\u0113", + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", + }; + /* Language hi: Hindi */ private static final String[] LANGUAGE_hi = { /* more_keys_for_a ~ */ - null, null, null, null, null, null, null, null, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keylabel_for_currency */ "\u20B9", @@ -1756,20 +1857,20 @@ public final class KeyboardTextsTable { /* more_keys_for_a ~ */ null, null, null, null, null, /* ~ more_keys_for_i */ - /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* more_keys_for_c */ "\u010D,\u0107,\u00E7", + /* double_quotes */ "!text/double_9qm_rqm", + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_rqm", /* 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 /* more_keys_for_s */ "\u0161,\u015B,\u00DF", - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u00F1,\u0144", /* more_keys_for_y */ null, // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE /* more_keys_for_d */ "\u0111", @@ -1827,10 +1928,12 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EE,\u00EF,\u00EC,\u012F,\u012B", + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_rqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_rqm", - /* more_keys_for_c ~ */ - null, null, null, null, null, null, null, null, null, null, + /* label_to_alpha_key ~ */ + 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", @@ -1839,8 +1942,8 @@ 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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+0531: "Ա" ARMENIAN CAPITAL LETTER AYB // U+0532: "Բ" ARMENIAN CAPITAL LETTER BEN @@ -1848,7 +1951,7 @@ public final class KeyboardTextsTable { /* label_to_alpha_key */ "\u0531\u0532\u0533", /* 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, /* ~ more_keys_for_cyrillic_soft_sign */ // U+058A: "֊" ARMENIAN HYPHEN // U+055C: "՜" ARMENIAN EXCLAMATION MARK @@ -1928,11 +2031,12 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EF,\u00EE,\u00EC,\u012F,\u012B", + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* more_keys_for_c ~ */ - null, null, null, null, - /* ~ more_keys_for_n */ + /* label_to_alpha_key */ null, + /* more_keys_for_s */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -1991,18 +2095,18 @@ public final class KeyboardTextsTable { /* Language iw: Hebrew */ private static final String[] LANGUAGE_iw = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_rqm_9qm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_rqm_9qm", - /* 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+20AA: "₪" NEW SHEQEL SIGN /* keylabel_for_currency */ "\u20AA", @@ -2048,11 +2152,11 @@ public final class KeyboardTextsTable { /* Language ka_GE: Georgian (Georgia) */ private static final String[] LANGUAGE_ka_GE = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* more_keys_for_c */ null, // Label for "switch to alphabetic" key. // U+10D0: "ა" GEORGIAN LETTER AN // U+10D1: "ბ" GEORGIAN LETTER BAN @@ -2063,15 +2167,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_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, /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", @@ -2119,8 +2223,8 @@ 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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+1780: "ក" KHMER LETTER KA // U+1781: "ខ" KHMER LETTER KHA @@ -2133,7 +2237,7 @@ public final class KeyboardTextsTable { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, 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", @@ -2142,15 +2246,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_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, /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", @@ -2185,15 +2289,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+20AD: "₭" KIP SIGN /* keylabel_for_currency */ "\u20AD", @@ -2247,22 +2351,22 @@ public final class KeyboardTextsTable { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I /* more_keys_for_i */ "\u012F,\u012B,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u00E7,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_lqm", /* 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 // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u0146,\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -2341,22 +2445,22 @@ public final class KeyboardTextsTable { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I /* more_keys_for_i */ "\u012B,\u012F,\u00EC,\u00ED,\u00EE,\u00EF,\u0131", - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u00E7,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_lqm", /* 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 // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u0146,\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -2391,18 +2495,18 @@ public final class KeyboardTextsTable { /* Language mk: Macedonian */ private static final String[] LANGUAGE_mk = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* 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_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, /* ~ more_keys_for_k */ // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE /* more_keys_for_cyrillic_ie */ "\u0450", @@ -2427,15 +2531,15 @@ 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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+20AE: "₮" TUGRIK SIGN /* keylabel_for_currency */ "\u20AE", @@ -2444,8 +2548,8 @@ public final class KeyboardTextsTable { /* 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 */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // Label for "switch to alphabetic" key. // U+1000: "က" MYANMAR LETTER KA // U+1001: "ခ" MYANMAR LETTER KHA @@ -2485,11 +2589,12 @@ public final class KeyboardTextsTable { // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON /* more_keys_for_e */ "\u00E9,\u00E8,\u00EA,\u00EB,\u0119,\u0117,\u0113", /* more_keys_for_i */ null, + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_rqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_rqm", - /* more_keys_for_c ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, + /* label_to_alpha_key ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ more_keys_for_cyrillic_ie */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keylabel_for_nordic_row1_11 */ "\u00E5", @@ -2509,15 +2614,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_s ~ */ - null, null, null, null, null, null, null, null, null, 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.", @@ -2603,14 +2708,14 @@ public final class KeyboardTextsTable { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+0133: "ij" LATIN SMALL LIGATURE IJ /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B,\u0133", + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", - /* 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", + /* single_quotes */ "!text/single_9qm_rqm", + /* label_to_alpha_key */ null, + /* more_keys_for_s */ null, // U+0133: "ij" LATIN SMALL LIGATURE IJ /* more_keys_for_y */ "\u0133", }; @@ -2646,20 +2751,20 @@ public final class KeyboardTextsTable { // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON /* more_keys_for_e */ "\u0119,\u00E8,\u00E9,\u00EA,\u00EB,\u0117,\u0113", /* more_keys_for_i */ null, - /* double_quotes */ "!text/double_9qm_rqm", - /* single_quotes */ "!text/single_9qm_rqm", // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* more_keys_for_c */ "\u0107,\u00E7,\u010D", + /* double_quotes */ "!text/double_9qm_rqm", + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* more_keys_for_n */ "\u0144,\u00F1", + /* single_quotes */ "!text/single_9qm_rqm", /* 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 /* more_keys_for_s */ "\u015B,\u00DF,\u0161", - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - /* more_keys_for_n */ "\u0144,\u00F1", /* more_keys_for_y */ null, /* more_keys_for_d */ null, // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE @@ -2713,8 +2818,6 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EE,\u00EC,\u00EF,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE @@ -2756,17 +2859,18 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", + /* more_keys_for_c */ null, /* double_quotes */ "!text/double_9qm_rqm", + /* more_keys_for_n */ null, /* 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, + /* more_keys_for_y ~ */ + null, null, null, /* ~ more_keys_for_z */ // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW /* more_keys_for_t */ "\u021B", @@ -2775,18 +2879,18 @@ public final class KeyboardTextsTable { /* Language ru: Russian */ private static final String[] LANGUAGE_ru = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* 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_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, /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", @@ -2852,23 +2956,23 @@ public final class KeyboardTextsTable { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I /* more_keys_for_i */ "\u00ED,\u012B,\u012F,\u00EC,\u00EE,\u00EF,\u0131", - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u00E7,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144", + /* single_quotes */ "!text/single_9qm_lqm", /* 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 // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA /* more_keys_for_s */ "\u0161,\u00DF,\u015B,\u015F", - // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -2905,15 +3009,15 @@ public final class KeyboardTextsTable { /* more_keys_for_a ~ */ null, null, null, null, null, /* ~ more_keys_for_i */ - /* double_quotes */ "!text/double_9qm_lqm", - /* single_quotes */ "!text/single_9qm_lqm", // U+010D: "č" LATIN SMALL LETTER C WITH CARON // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE /* more_keys_for_c */ "\u010D,\u0107", + /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, + /* single_quotes */ "!text/single_9qm_lqm", /* label_to_alpha_key */ null, // U+0161: "š" LATIN SMALL LETTER S WITH CARON /* more_keys_for_s */ "\u0161", - /* more_keys_for_n */ null, /* more_keys_for_y */ null, // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE /* more_keys_for_d */ "\u0111", @@ -2929,11 +3033,11 @@ public final class KeyboardTextsTable { /* Language sr: Serbian */ private static final String[] LANGUAGE_sr = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* more_keys_for_c */ null, // END: More keys definitions for Serbian (Cyrillic) // Label for "switch to alphabetic" key. // U+0410: "А" CYRILLIC CAPITAL LETTER A @@ -2941,7 +3045,7 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_s ~ */ - null, null, null, null, null, null, null, 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", @@ -3017,22 +3121,22 @@ public final class KeyboardTextsTable { // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS /* more_keys_for_i */ "\u00ED,\u00EC,\u00EE,\u00EF", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+010D: "č" LATIN SMALL LETTER C WITH CARON /* more_keys_for_c */ "\u00E7,\u0107,\u010D", + /* double_quotes */ null, + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + /* more_keys_for_n */ "\u0144,\u00F1,\u0148", + /* single_quotes */ null, /* 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 // U+00DF: "ß" LATIN SMALL LETTER SHARP S /* more_keys_for_s */ "\u015B,\u0161,\u015F,\u00DF", - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - /* more_keys_for_n */ "\u0144,\u00F1,\u0148", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS /* more_keys_for_y */ "\u00FD,\u00FF", @@ -3111,15 +3215,15 @@ public final class KeyboardTextsTable { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* more_keys_for_c */ "\u00E7", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* more_keys_for_n */ "\u00F1", + /* single_quotes */ null, /* 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", /* more_keys_for_y ~ */ null, null, null, null, null, /* ~ more_keys_for_l */ @@ -3129,15 +3233,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, - /* ~ more_keys_for_c */ + null, null, null, null, null, null, null, null, null, + /* ~ single_quotes */ // 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT /* keylabel_for_currency */ "\u0E3F", @@ -3187,14 +3291,11 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u00ED,\u00EF,\u00EC,\u00EE,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, + /* double_quotes */ null, // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE /* more_keys_for_n */ "\u00F1,\u0144", @@ -3228,20 +3329,20 @@ public final class KeyboardTextsTable { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON /* more_keys_for_i */ "\u0131,\u00EE,\u00EF,\u00EC,\u00ED,\u012F,\u012B", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // 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, + /* double_quotes ~ */ + null, null, null, null, + /* ~ label_to_alpha_key */ // 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, + /* more_keys_for_y ~ */ + null, null, null, null, null, /* ~ more_keys_for_l */ // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE /* more_keys_for_g */ "\u011F", @@ -3250,18 +3351,18 @@ public final class KeyboardTextsTable { /* Language uk: Ukrainian */ private static final String[] LANGUAGE_uk = { /* more_keys_for_a ~ */ - null, null, null, null, null, - /* ~ more_keys_for_i */ + null, null, null, null, null, null, + /* ~ more_keys_for_c */ /* double_quotes */ "!text/double_9qm_lqm", + /* more_keys_for_n */ null, /* single_quotes */ "!text/single_9qm_lqm", - /* 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_s ~ */ - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, /* ~ double_angle_quotes */ // U+20B4: "₴" HRYVNIA SIGN /* keylabel_for_currency */ "\u20B4", @@ -3358,9 +3459,9 @@ public final class KeyboardTextsTable { // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE // U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW /* more_keys_for_i */ "\u00EC,\u00ED,\u1EC9,\u0129,\u1ECB", - /* double_quotes ~ */ + /* more_keys_for_c ~ */ null, null, null, null, null, null, - /* ~ more_keys_for_n */ + /* ~ more_keys_for_s */ // 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 @@ -3415,15 +3516,15 @@ public final class KeyboardTextsTable { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE /* more_keys_for_i */ "\u00EE,\u00EF,\u00ED,\u012B,\u00EC", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA /* more_keys_for_c */ "\u00E7", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + /* more_keys_for_n */ "\u00F1", + /* single_quotes */ null, /* 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", }; /* Language zz: Alphabet */ @@ -3484,14 +3585,21 @@ public final class KeyboardTextsTable { // U+0131: "ı" LATIN SMALL LETTER DOTLESS I // U+0133: "ij" LATIN SMALL LIGATURE IJ /* more_keys_for_i */ "\u00EC,\u00ED,\u00EE,\u00EF,\u0129,\u012B,\u012D,\u012F,\u0131,\u0133", - /* double_quotes */ null, - /* single_quotes */ null, // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX // 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", + /* double_quotes */ null, + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + // 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", + /* single_quotes */ null, /* label_to_alpha_key */ null, // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE @@ -3500,13 +3608,6 @@ public final class KeyboardTextsTable { // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+017F: "ſ" LATIN SMALL LETTER LONG S /* more_keys_for_s */ "\u00DF,\u015B,\u015D,\u015F,\u0161,\u017F", - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - // 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", // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -3574,19 +3675,21 @@ 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/ 9 Bulgarian */ + "bg", LANGUAGE_bg, /* 2/ 10 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/ 9 Greek */ + "el", LANGUAGE_el, /* 1/ 10 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) */ + "eu", LANGUAGE_eu_ES, /* 7/ 8 Basque (Spain) */ "fa", LANGUAGE_fa, /* 61/119 Persian */ "fi", LANGUAGE_fi, /* 10/ 34 Finnish */ "fr", LANGUAGE_fr, /* 13/ 92 French */ + "gl", LANGUAGE_gl_ES, /* 7/ 8 Gallegan (Spain) */ "hi", LANGUAGE_hi, /* 24/ 56 Hindi */ "hr", LANGUAGE_hr, /* 9/ 19 Croatian */ "hu", LANGUAGE_hu, /* 9/ 19 Hungarian */ @@ -3594,7 +3697,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/ 9 Georgian (Georgia) */ + "ka", LANGUAGE_ka_GE, /* 3/ 10 Georgian (Georgia) */ "kk", LANGUAGE_kk, /* 15/114 Kazakh */ "km", LANGUAGE_km_KH, /* 2/115 Khmer (Cambodia) */ "ky", LANGUAGE_ky, /* 10/ 81 Kirghiz */ @@ -3603,12 +3706,12 @@ 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) */ + "my", LANGUAGE_my_MM, /* 1/ 10 Burmese (Myanmar) */ "nb", LANGUAGE_nb, /* 11/ 34 Norwegian Bokmål */ "ne", LANGUAGE_ne_NP, /* 24/ 56 Nepali (Nepal) */ "nl", LANGUAGE_nl, /* 9/ 12 Dutch */ "pl", LANGUAGE_pl, /* 10/ 16 Polish */ - "pt", LANGUAGE_pt, /* 6/ 8 Portuguese */ + "pt", LANGUAGE_pt, /* 6/ 6 Portuguese */ "rm", LANGUAGE_rm, /* 1/ 2 Raeto-Romance */ "ro", LANGUAGE_ro, /* 6/ 15 Romanian */ "ru", LANGUAGE_ru, /* 9/ 32 Russian */ @@ -3618,7 +3721,7 @@ 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/ 11 Tagalog */ + "tl", LANGUAGE_tl, /* 7/ 8 Tagalog */ "tr", LANGUAGE_tr, /* 7/ 17 Turkish */ "uk", LANGUAGE_uk, /* 11/ 80 Ukrainian */ "vi", LANGUAGE_vi, /* 8/ 20 Vietnamese */ diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 4a18c2b3c..fc5c7f7ec 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -169,7 +169,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private int mDelayUpdateSuggestions; private int mDelayUpdateShiftState; - private long mDoubleSpacePeriodTimeout; private long mDoubleSpacePeriodTimerStart; public UIHandler(final LatinIME ownerInstance) { @@ -184,8 +183,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final Resources res = latinIme.getResources(); mDelayUpdateSuggestions = res.getInteger(R.integer.config_delay_update_suggestions); mDelayUpdateShiftState = res.getInteger(R.integer.config_delay_update_shift_state); - mDoubleSpacePeriodTimeout = - res.getInteger(R.integer.config_double_space_period_timeout); } @Override @@ -327,7 +324,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen public boolean isAcceptingDoubleSpacePeriod() { return SystemClock.uptimeMillis() - mDoubleSpacePeriodTimerStart - < mDoubleSpacePeriodTimeout; + < getOwnerInstance().mSettings.getCurrent().mDoubleSpacePeriodTimeout; } // Working variables for the following methods. @@ -1276,15 +1273,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final InputTransaction completeInputTransaction = mInputLogic.onCodeInput(mSettings.getCurrent(), event, mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); - switch (completeInputTransaction.getRequiredShiftUpdate()) { - case InputTransaction.SHIFT_UPDATE_LATER: - mHandler.postUpdateShiftState(); - break; - case InputTransaction.SHIFT_UPDATE_NOW: - mKeyboardSwitcher.updateShiftState(); - break; - default: // SHIFT_NO_UPDATE - } + updateShiftModeAfterInputTransaction(completeInputTransaction.getRequiredShiftUpdate()); mKeyboardSwitcher.onCodeInput(codePoint); } @@ -1500,8 +1489,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // interface @Override public void pickSuggestionManually(final int index, final SuggestedWordInfo suggestionInfo) { - mInputLogic.onPickSuggestionManually(mSettings.getCurrent(), index, suggestionInfo, - mHandler, mKeyboardSwitcher); + final InputTransaction completeInputTransaction = mInputLogic.onPickSuggestionManually( + mSettings.getCurrent(), index, suggestionInfo, + mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); + updateShiftModeAfterInputTransaction(completeInputTransaction.getRequiredShiftUpdate()); } @Override @@ -1539,6 +1530,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } + private void updateShiftModeAfterInputTransaction(final int requiredShiftUpdate) { + switch (requiredShiftUpdate) { + case InputTransaction.SHIFT_UPDATE_LATER: + mHandler.postUpdateShiftState(); + break; + case InputTransaction.SHIFT_UPDATE_NOW: + mKeyboardSwitcher.updateShiftState(); + break; + default: // SHIFT_NO_UPDATE + } + } + private void hapticAndAudioFeedback(final int code, final int repeatCount) { final MainKeyboardView keyboardView = mKeyboardSwitcher.getMainKeyboardView(); if (keyboardView != null && keyboardView.isInDraggingFinger()) { diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index fa7c4b4fc..1eff42762 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -196,13 +196,16 @@ public final class InputLogic { * @param settingsValues the current values of the settings. * @param index the index of the suggestion. * @param suggestionInfo the suggestion info. + * @param keyboardShiftState the shift state of the keyboard, as returned by + * {@link com.android.inputmethod.keyboard.KeyboardSwitcher#getKeyboardShiftMode()} + * @return the complete transaction object */ // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener} // interface - public void onPickSuggestionManually(final SettingsValues settingsValues, - final int index, final SuggestedWordInfo suggestionInfo, - // TODO: remove these two arguments - final LatinIME.UIHandler handler, final KeyboardSwitcher keyboardSwitcher) { + public InputTransaction onPickSuggestionManually(final SettingsValues settingsValues, + final int index, final SuggestedWordInfo suggestionInfo, final int keyboardShiftState, + // TODO: remove this argument + final LatinIME.UIHandler handler) { final SuggestedWords suggestedWords = mSuggestedWords; final String suggestion = suggestionInfo.mWord; // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput @@ -212,16 +215,26 @@ public final class InputLogic { LatinImeLogger.logOnManualSuggestion("", suggestion, index, suggestedWords); // Rely on onCodeInput to do the complicated swapping/stripping logic consistently. final int primaryCode = suggestion.charAt(0); - final Event event = Event.createSoftwareKeypressEvent(primaryCode, Event.NOT_A_KEY_CODE, - Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE); - onCodeInput(settingsValues, event, keyboardSwitcher.getKeyboardShiftMode(), handler); + // TODO: we should be using createSuggestionPickedEvent here, but for legacy reasons, + // onCodeInput is expected a software keypress event for a suggested punctuation + // because the current code is descended from a time where this information used not + // to be available. Fix this. + final Event event = Event.createSoftwareKeypressEvent(primaryCode, + Event.NOT_A_KEY_CODE /* keyCode*/, + Constants.SUGGESTION_STRIP_COORDINATE /* x */, + Constants.SUGGESTION_STRIP_COORDINATE /* y */); + final InputTransaction completeTransaction = onCodeInput(settingsValues, event, + keyboardShiftState, handler); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.latinIME_punctuationSuggestion(index, suggestion, false /* isBatchMode */, suggestedWords.mIsPrediction); } - return; + return completeTransaction; } + final Event event = Event.createSuggestionPickedEvent(suggestionInfo); + final InputTransaction inputTransaction = new InputTransaction(settingsValues, + event, SystemClock.uptimeMillis(), mSpaceState, keyboardShiftState); mConnection.beginBatchEdit(); if (SpaceState.PHANTOM == mSpaceState && suggestion.length() > 0 // In the batch input mode, a manually picked suggested word should just replace @@ -241,11 +254,11 @@ public final class InputLogic { if (SuggestedWordInfo.KIND_APP_DEFINED == suggestionInfo.mKind) { mSuggestedWords = SuggestedWords.EMPTY; mSuggestionStripViewAccessor.setNeutralSuggestionStrip(); - keyboardSwitcher.updateShiftState(); + inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW); resetComposingState(true /* alsoResetLastComposedWord */); mConnection.commitCompletion(suggestionInfo.mApplicationSpecifiedCompletionInfo); mConnection.endBatchEdit(); - return; + return inputTransaction; } // We need to log before we commit, because the word composer will store away the user @@ -264,7 +277,7 @@ public final class InputLogic { mLastComposedWord.deactivate(); // Space state must be updated before calling updateShiftState mSpaceState = SpaceState.PHANTOM; - keyboardSwitcher.updateShiftState(); + inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW); // We should show the "Touch again to save" hint if the user pressed the first entry // AND it's in none of our current dictionaries (main, user or otherwise). @@ -290,6 +303,7 @@ public final class InputLogic { // If we're not showing the "Touch again to save", then update the suggestion strip. handler.postUpdateSuggestionStrip(); } + return inputTransaction; } /** diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 5a652a557..d47a61ed1 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -50,6 +50,7 @@ public final class SettingsValues { // From resources: public final SpacingAndPunctuations mSpacingAndPunctuations; public final int mDelayUpdateOldSuggestions; + public final long mDoubleSpacePeriodTimeout; // From preferences, in the same order as xml/prefs.xml: public final boolean mAutoCap; @@ -132,6 +133,7 @@ public final class SettingsValues { mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res); mAutoCorrectEnabled = Settings.readAutoCorrectEnabled(autoCorrectionThresholdRawValue, res); mBigramPredictionEnabled = readBigramPredictionEnabled(prefs, res); + mDoubleSpacePeriodTimeout = res.getInteger(R.integer.config_double_space_period_timeout); // Compute other readable settings mKeyLongpressTimeout = Settings.readKeyLongpressTimeout(prefs, res); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java index eaa25823f..a0949637b 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Azerty.java @@ -61,16 +61,16 @@ public final class Azerty extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("a", moreKey("1")), - key("z", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("y", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0"))) + key("a", additionalMoreKey("1")), + key("z", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("y", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0"))) .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 0972cc12f..3282e44ae 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Bulgarian.java @@ -77,29 +77,29 @@ public final class Bulgarian extends LayoutBase { key("\u043F", moreKey("0")), // U+0447: "ч" CYRILLIC SMALL LETTER CHE "\u0447") - // 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+0439: "й" CYRILLIC SMALL LETTER SHORT I - // U+043A: "к" CYRILLIC SMALL LETTER KA - // U+043B: "л" CYRILLIC SMALL LETTER EL - // U+0448: "ш" CYRILLIC SMALL LETTER SHA - // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA .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+0439: "й" CYRILLIC SMALL LETTER SHORT I + // U+043A: "к" CYRILLIC SMALL LETTER KA + // U+043B: "л" CYRILLIC SMALL LETTER EL + // U+0448: "ш" CYRILLIC SMALL LETTER SHA + // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA "\u0430", "\u0441", "\u0434", "\u0444", "\u0433", "\u0445", "\u0439", "\u043A", "\u043B", "\u0448", "\u0449") - // U+0437: "з" CYRILLIC SMALL LETTER ZE - // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN - // U+0446: "ц" CYRILLIC SMALL LETTER TSE - // U+0436: "ж" CYRILLIC SMALL LETTER ZHE - // U+0431: "б" CYRILLIC SMALL LETTER BE - // U+043D: "н" CYRILLIC SMALL LETTER EN - // U+043C: "м" CYRILLIC SMALL LETTER EM - // U+044E: "ю" CYRILLIC SMALL LETTER YU .setKeysOfRow(3, + // U+0437: "з" CYRILLIC SMALL LETTER ZE + // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN + // U+0446: "ц" CYRILLIC SMALL LETTER TSE + // U+0436: "ж" CYRILLIC SMALL LETTER ZHE + // U+0431: "б" CYRILLIC SMALL LETTER BE + // U+043D: "н" CYRILLIC SMALL LETTER EN + // U+043C: "м" CYRILLIC SMALL LETTER EM + // U+044E: "ю" CYRILLIC SMALL LETTER YU "\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 f8de93491..20a5f7dac 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/BulgarianBds.java @@ -67,30 +67,30 @@ public final class BulgarianBds extends LayoutBase { key("\u0446", moreKey("0")), // U+0431: "б" CYRILLIC SMALL LETTER BE "\u0431") - // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN - // U+044F: "я" CYRILLIC SMALL LETTER YA - // U+0430: "а" CYRILLIC SMALL LETTER A - // U+043E: "о" CYRILLIC SMALL LETTER O - // U+0436: "ж" CYRILLIC SMALL LETTER ZHE - // U+0433: "г" CYRILLIC SMALL LETTER GHE - // U+0442: "т" CYRILLIC SMALL LETTER TE - // U+043D: "н" CYRILLIC SMALL LETTER EN - // U+0432: "в" CYRILLIC SMALL LETTER VE - // U+043C: "м" CYRILLIC SMALL LETTER EM - // U+0447: "ч" CYRILLIC SMALL LETTER CHE .setKeysOfRow(2, + // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN + // U+044F: "я" CYRILLIC SMALL LETTER YA + // U+0430: "а" CYRILLIC SMALL LETTER A + // U+043E: "о" CYRILLIC SMALL LETTER O + // U+0436: "ж" CYRILLIC SMALL LETTER ZHE + // U+0433: "г" CYRILLIC SMALL LETTER GHE + // U+0442: "т" CYRILLIC SMALL LETTER TE + // U+043D: "н" CYRILLIC SMALL LETTER EN + // U+0432: "в" CYRILLIC SMALL LETTER VE + // U+043C: "м" CYRILLIC SMALL LETTER EM + // U+0447: "ч" CYRILLIC SMALL LETTER CHE "\u044C", "\u044F", "\u0430", "\u043E", "\u0436", "\u0433", "\u0442", "\u043D", "\u0432", "\u043C", "\u0447") - // U+044E: "ю" CYRILLIC SMALL LETTER YU - // U+0439: "й" CYRILLIC SMALL LETTER SHORT I - // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN - // U+044D: "э" CYRILLIC SMALL LETTER E - // U+0444: "ф" CYRILLIC SMALL LETTER EF - // U+0445: "х" CYRILLIC SMALL LETTER HA - // U+043F: "п" CYRILLIC SMALL LETTER PE - // U+0440: "р" CYRILLIC SMALL LETTER ER - // U+043B: "л" CYRILLIC SMALL LETTER EL .setKeysOfRow(3, + // U+044E: "ю" CYRILLIC SMALL LETTER YU + // U+0439: "й" CYRILLIC SMALL LETTER SHORT I + // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN + // U+044D: "э" CYRILLIC SMALL LETTER E + // U+0444: "ф" CYRILLIC SMALL LETTER EF + // U+0445: "х" CYRILLIC SMALL LETTER HA + // U+043F: "п" CYRILLIC SMALL LETTER PE + // U+0440: "р" CYRILLIC SMALL LETTER ER + // U+043B: "л" CYRILLIC SMALL LETTER EL "\u044E", "\u0439", "\u044A", "\u044D", "\u0444", "\u0445", "\u043F", "\u0440", "\u043B") .build(); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java b/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java new file mode 100644 index 000000000..a4a9701cd --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/Colemak.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout; + +import com.android.inputmethod.keyboard.KeyboardId; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +/** + * The Colemak alphabet keyboard. + */ +public final class Colemak extends LayoutBase { + private static final String LAYOUT_NAME = "colemak"; + + public Colemak(final LayoutCustomizer customizer) { + super(customizer, Symbols.class, SymbolsShifted.class); + } + + @Override + public String getName() { return LAYOUT_NAME; } + + @Override + ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON); + getCustomizer().setAccentedLetters(builder); + builder.replaceKeyOfLabel(ROW1_10, key(";", additionalMoreKey("0"), moreKey(":"))); + return builder.build(); + } + + @Override + ExpectedKey[][] getCommonAlphabetShiftLayout(final boolean isPhone, final int elementId) { + final ExpectedKeyboardBuilder builder; + if (elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED + || elementId == KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED) { + builder = new ExpectedKeyboardBuilder(getCommonAlphabetLayout(isPhone)); + } else { + builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON); + getCustomizer().setAccentedLetters(builder); + builder.replaceKeyOfLabel(ROW1_10, key(":", additionalMoreKey("0"))); + } + builder.toUpperCase(getLocale()); + return builder.build(); + } + + private static final String ROW1_10 = "ROW1_10"; + + private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() + .setKeysOfRow(1, + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("f", additionalMoreKey("3")), + key("p", additionalMoreKey("4")), + key("g", additionalMoreKey("5")), + key("j", additionalMoreKey("6")), + key("l", additionalMoreKey("7")), + key("u", additionalMoreKey("8")), + key("y", additionalMoreKey("9")), + ROW1_10) + .setKeysOfRow(2, "a", "r", "s", "t", "d", "h", "n", "e", "i", "o") + .setKeysOfRow(3, "z", "x", "c", "v", "b", "k", "m") + .build(); +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java new file mode 100644 index 000000000..99cf6e50e --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/Dvorak.java @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout; + +import com.android.inputmethod.keyboard.KeyboardId; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey; + +import java.util.Locale; + +/** + * The QWERTY alphabet keyboard. + */ +public final class Dvorak extends LayoutBase { + private static final String LAYOUT_NAME = "dvorak"; + + public Dvorak(final LayoutCustomizer customizer) { + super(customizer, Symbols.class, SymbolsShifted.class); + } + + @Override + public String getName() { return LAYOUT_NAME; } + + public static class DvorakCustomizer extends LayoutCustomizer { + public DvorakCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) { + return isPhone ? joinKeys(SHIFT_KEY): joinKeys(SHIFT_KEY, key("q")); + } + + @Override + public ExpectedKey[] getRightShiftKeys(final boolean isPhone) { + return isPhone ? EMPTY_KEYS : joinKeys(key("z"), SHIFT_KEY); + } + + @Override + public ExpectedKey[] getKeysLeftToSpacebar(final boolean isPhone) { + return isPhone ? joinKeys(key("q", SHORTCUT_KEY, SETTINGS_KEY)) : joinKeys(key("/")); + } + + @Override + public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) { + final ExpectedAdditionalMoreKey[] punctuationMoreKeys = + convertToAdditionalMoreKeys(getPunctuationMoreKeys(isPhone)); + return isPhone + ? joinKeys(key("z", punctuationMoreKeys)) + : joinKeys(key("?", moreKey("!")), key("-", moreKey("_"))); + } + + private static ExpectedAdditionalMoreKey[] convertToAdditionalMoreKeys( + final ExpectedKey ... moreKeys) { + final ExpectedAdditionalMoreKey[] additionalMoreKeys = + new ExpectedAdditionalMoreKey[moreKeys.length]; + for (int index = 0; index < moreKeys.length; index++) { + additionalMoreKeys[index] = ExpectedAdditionalMoreKey.newInstance(moreKeys[index]); + } + return additionalMoreKeys; + } + } + + @Override + ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; } + + @Override + public ExpectedKey[][] getLayout(final boolean isPhone, final int elementId) { + if (elementId == KeyboardId.ELEMENT_SYMBOLS + || elementId == KeyboardId.ELEMENT_SYMBOLS_SHIFTED) { + return super.getLayout(isPhone, elementId); + } + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder( + getCommonAlphabetLayout(isPhone)); + if (elementId == KeyboardId.ELEMENT_ALPHABET + || elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) { + builder.addKeysOnTheLeftOfRow(1, + key("'", joinMoreKeys(additionalMoreKey("1"), "!", "\"")), + key(",", joinMoreKeys(additionalMoreKey("2"), "?", "<")), + key(".", joinMoreKeys(additionalMoreKey("3"), ">"))); + } else { + builder.addKeysOnTheLeftOfRow(1, + key("\"", additionalMoreKey("1")), + key("<", additionalMoreKey("2")), + key(">", additionalMoreKey("3"))); + } + convertCommonLayoutToKeyboard(builder, isPhone); + getCustomizer().setAccentedLetters(builder); + if (elementId != KeyboardId.ELEMENT_ALPHABET) { + builder.toUpperCase(getLocale()); + builder.replaceKeysOfAll(SHIFT_KEY, SHIFTED_SHIFT_KEY); + } + return builder.build(); + } + + private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() + .setKeysOfRow(1, + key("p", additionalMoreKey("4")), + key("y", additionalMoreKey("5")), + key("f", additionalMoreKey("6")), + key("g", additionalMoreKey("7")), + key("c", additionalMoreKey("8")), + key("r", additionalMoreKey("9")), + key("l", additionalMoreKey("0"))) + .setKeysOfRow(2, "a", "o", "e", "u", "i", "d", "h", "t", "n", "s") + .setKeysOfRow(3, "j", "k", "x", "b", "m", "w", "v") + .build(); +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java index f6de53fa7..7fcc974c2 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/EastSlavic.java @@ -63,47 +63,47 @@ public final class EastSlavic extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, // U+0443: "у" CYRILLIC SMALL LETTER U - key("\u0439", moreKey("1")), + key("\u0439", additionalMoreKey("1")), // U+0446: "ц" CYRILLIC SMALL LETTER TSE - key("\u0446", moreKey("2")), + key("\u0446", additionalMoreKey("2")), // U+0439: "й" CYRILLIC SMALL LETTER SHORT I - key("\u0443", moreKey("3")), + key("\u0443", additionalMoreKey("3")), // U+043A: "к" CYRILLIC SMALL LETTER KA - key("\u043A", moreKey("4")), + key("\u043A", additionalMoreKey("4")), // U+0435: "е" CYRILLIC SMALL LETTER IE - key("\u0435", moreKey("5")), + key("\u0435", additionalMoreKey("5")), // U+043D: "н" CYRILLIC SMALL LETTER EN - key("\u043D", moreKey("6")), + key("\u043D", additionalMoreKey("6")), // U+0433: "г" CYRILLIC SMALL LETTER GHE - key("\u0433", moreKey("7")), + key("\u0433", additionalMoreKey("7")), // U+0448: "ш" CYRILLIC SMALL LETTER SHA - key("\u0448", moreKey("8")), - key(ROW1_9, moreKey("9")), + key("\u0448", additionalMoreKey("8")), + key(ROW1_9, additionalMoreKey("9")), // U+0437: "з" CYRILLIC SMALL LETTER ZE - key("\u0437", moreKey("0")), + key("\u0437", additionalMoreKey("0")), // U+0445: "х" CYRILLIC SMALL LETTER HA "\u0445") - // U+0444: "ф" CYRILLIC SMALL LETTER EF - // U+0432: "в" CYRILLIC SMALL LETTER VE - // U+0430: "а" CYRILLIC SMALL LETTER A - // U+043F: "п" CYRILLIC SMALL LETTER PE - // 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+0436: "ж" CYRILLIC SMALL LETTER ZHE .setKeysOfRow(2, + // U+0444: "ф" CYRILLIC SMALL LETTER EF + // U+0432: "в" CYRILLIC SMALL LETTER VE + // U+0430: "а" CYRILLIC SMALL LETTER A + // U+043F: "п" CYRILLIC SMALL LETTER PE + // 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+0436: "ж" CYRILLIC SMALL LETTER ZHE "\u0444", ROW2_2, "\u0432", "\u0430", "\u043F", "\u0440", "\u043E", "\u043B", "\u0434", "\u0436", ROW2_11) - // U+044F: "я" CYRILLIC SMALL LETTER YA - // U+0447: "ч" CYRILLIC SMALL LETTER CHE - // U+0441: "с" CYRILLIC SMALL LETTER ES - // U+043C: "м" CYRILLIC SMALL LETTER EM - // U+0442: "т" CYRILLIC SMALL LETTER TE - // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN - // U+0431: "б" CYRILLIC SMALL LETTER BE - // U+044E: "ю" CYRILLIC SMALL LETTER YU .setKeysOfRow(3, + // U+044F: "я" CYRILLIC SMALL LETTER YA + // U+0447: "ч" CYRILLIC SMALL LETTER CHE + // U+0441: "с" CYRILLIC SMALL LETTER ES + // U+043C: "м" CYRILLIC SMALL LETTER EM + // U+0442: "т" CYRILLIC SMALL LETTER TE + // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN + // U+0431: "б" CYRILLIC SMALL LETTER BE + // U+044E: "ю" CYRILLIC SMALL LETTER YU "\u044F", "\u0447", "\u0441", "\u043C", ROW3_5, "\u0442", "\u044C", "\u0431", "\u044E") .build(); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java index 1a71fad95..0ec9f4cf4 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Greek.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Greek.java @@ -36,7 +36,7 @@ public final class Greek extends LayoutBase { @Override public String getName() { return LAYOUT_NAME; } - public static class GreekCustomizer extends EuroLayoutCustomizer { + public static class GreekCustomizer extends EuroCustomizer { public GreekCustomizer(final Locale locale) { super(locale); } @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java index 256a0d1a5..d870931ac 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/LayoutBase.java @@ -188,8 +188,8 @@ public abstract class LayoutBase extends AbstractLayoutBase { /** * The layout customize class for countries that use Euro. */ - public static class EuroLayoutCustomizer extends LayoutCustomizer { - public EuroLayoutCustomizer(final Locale locale) { + public static class EuroCustomizer extends LayoutCustomizer { + public EuroCustomizer(final Locale locale) { super(locale); } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java index cee7eee8d..c791c404d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Nordic.java @@ -41,16 +41,16 @@ public final class Nordic extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("q", moreKey("1")), - key("w", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("y", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0")), + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("y", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0")), 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") diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java index 7ede74cef..d790a1e53 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java @@ -37,16 +37,16 @@ public final class Qwerty extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("q", moreKey("1")), - key("w", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("y", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0"))) + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("y", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0"))) .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 6fce3f6d9..26ba6cffb 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwertz.java @@ -34,16 +34,16 @@ public final class Qwertz extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("q", moreKey("1")), - key("w", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("z", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0"))) + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("z", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0"))) .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 4f8911baa..be8b435d4 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/SouthSlavic.java @@ -63,24 +63,24 @@ public final class SouthSlavic extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, // U+0459: "љ" CYRILLIC SMALL LETTER LJE - key("\u0459", moreKey("1")), + key("\u0459", additionalMoreKey("1")), // U+045A: "њ" CYRILLIC SMALL LETTER NJE - key("\u045A", moreKey("2")), + key("\u045A", additionalMoreKey("2")), // U+0435: "е" CYRILLIC SMALL LETTER IE - key("\u0435", moreKey("3")), + key("\u0435", additionalMoreKey("3")), // U+0440: "р" CYRILLIC SMALL LETTER ER - key("\u0440", moreKey("4")), + key("\u0440", additionalMoreKey("4")), // U+0442: "т" CYRILLIC SMALL LETTER TE - key("\u0442", moreKey("5")), - key(ROW1_6, moreKey("6")), + key("\u0442", additionalMoreKey("5")), + key(ROW1_6, additionalMoreKey("6")), // U+0443: "у" CYRILLIC SMALL LETTER U - key("\u0443", moreKey("7")), + key("\u0443", additionalMoreKey("7")), // U+0438: "и" CYRILLIC SMALL LETTER I - key("\u0438", moreKey("8")), + key("\u0438", additionalMoreKey("8")), // U+043E: "о" CYRILLIC SMALL LETTER O - key("\u043E", moreKey("9")), + key("\u043E", additionalMoreKey("9")), // U+043F: "п" CYRILLIC SMALL LETTER PE - key("\u043F", moreKey("0")), + key("\u043F", additionalMoreKey("0")), // U+0448: "ш" CYRILLIC SMALL LETTER SHA "\u0448") .setKeysOfRow(2, diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java index 9e6556089..225b9f604 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Spanish.java @@ -36,16 +36,16 @@ public final class Spanish extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("q", moreKey("1")), - key("w", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("y", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0"))) + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("y", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0"))) .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 c6562e245..01a602054 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Swiss.java @@ -38,16 +38,16 @@ public final class Swiss extends LayoutBase { private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() .setKeysOfRow(1, - key("q", moreKey("1")), - key("w", moreKey("2")), - key("e", moreKey("3")), - key("r", moreKey("4")), - key("t", moreKey("5")), - key("z", moreKey("6")), - key("u", moreKey("7")), - key("i", moreKey("8")), - key("o", moreKey("9")), - key("p", moreKey("0")), + key("q", additionalMoreKey("1")), + key("w", additionalMoreKey("2")), + key("e", additionalMoreKey("3")), + key("r", additionalMoreKey("4")), + key("t", additionalMoreKey("5")), + key("z", additionalMoreKey("6")), + key("u", additionalMoreKey("7")), + key("i", additionalMoreKey("8")), + key("o", additionalMoreKey("9")), + key("p", additionalMoreKey("0")), 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") 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 f9427bc2d..a13ec7529 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractLayoutBase.java @@ -17,6 +17,7 @@ package com.android.inputmethod.keyboard.layout.expected; import com.android.inputmethod.keyboard.internal.KeyboardIconsSet; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.utils.StringUtils; @@ -61,6 +62,15 @@ public abstract class AbstractLayoutBase { return ExpectedKey.newInstance(key.getVisual(), key.getOutput(), moreKeys); } + // Helper method to create an {@link ExpectedAdditionalMoreKey} object for an + // "additional more key" that has the label. + // The additional more keys can be defined independently from other more keys. The position of + // the additional more keys in the long press popup keyboard can be controlled by specifying + // special marker "%" in the usual more keys definitions. + public static ExpectedAdditionalMoreKey additionalMoreKey(final String label) { + return ExpectedAdditionalMoreKey.newInstance(label); + } + // Helper method to create an {@link ExpectedKey} object for a "more key" that has the label. public static ExpectedKey moreKey(final String label) { return ExpectedKey.newInstance(label); @@ -99,6 +109,8 @@ public abstract class AbstractLayoutBase { // Icon ids. private static final int ICON_DELETE = KeyboardIconsSet.getIconId( KeyboardIconsSet.NAME_DELETE_KEY); + private static final int ICON_SHORTCUT = KeyboardIconsSet.getIconId( + KeyboardIconsSet.NAME_SHORTCUT_KEY); private static final int ICON_SETTINGS = KeyboardIconsSet.getIconId( KeyboardIconsSet.NAME_SETTINGS_KEY); private static final int ICON_ENTER = KeyboardIconsSet.getIconId( @@ -108,6 +120,7 @@ public abstract class AbstractLayoutBase { // Functional keys. public static final ExpectedKey DELETE_KEY = key(ICON_DELETE, Constants.CODE_DELETE); + public static final ExpectedKey SHORTCUT_KEY = key(ICON_SHORTCUT, Constants.CODE_SHORTCUT); public static final ExpectedKey SETTINGS_KEY = key(ICON_SETTINGS, Constants.CODE_SETTINGS); public static final ExpectedKey ENTER_KEY = key(ICON_ENTER, Constants.CODE_ENTER); public static final ExpectedKey EMOJI_KEY = key(ICON_EMOJI, Constants.CODE_EMOJI); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKey.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKey.java index 98c08aded..ad08ba5a6 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKey.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKey.java @@ -18,7 +18,9 @@ package com.android.inputmethod.keyboard.layout.expected; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.internal.MoreKeySpec; +import com.android.inputmethod.latin.utils.CollectionUtils; +import java.util.ArrayList; import java.util.Arrays; import java.util.Locale; @@ -29,44 +31,73 @@ public class ExpectedKey { static ExpectedKey EMPTY_KEY = newInstance(""); // A key that has a string label and may have "more keys". - static ExpectedKey newInstance(final String label, final ExpectedKey ... moreKeys) { + static ExpectedKey newInstance(final String label, final ExpectedKey... moreKeys) { return newInstance(label, label, moreKeys); } // A key that has a string label and a different output text and may have "more keys". static ExpectedKey newInstance(final String label, final String outputText, - final ExpectedKey ... moreKeys) { + final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(label), ExpectedKeyOutput.newInstance(outputText), moreKeys); } // A key that has a string label and a code point output and may have "more keys". static ExpectedKey newInstance(final String label, final int code, - final ExpectedKey ... moreKeys) { + final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(label), ExpectedKeyOutput.newInstance(code), moreKeys); } // A key that has an icon and an output text and may have "more keys". static ExpectedKey newInstance(final int iconId, final String outputText, - final ExpectedKey ... moreKeys) { + final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(iconId), ExpectedKeyOutput.newInstance(outputText), moreKeys); } // A key that has an icon and a code point output and may have "more keys". static ExpectedKey newInstance(final int iconId, final int code, - final ExpectedKey ... moreKeys) { + final ExpectedKey... moreKeys) { return newInstance(ExpectedKeyVisual.newInstance(iconId), ExpectedKeyOutput.newInstance(code), moreKeys); } static ExpectedKey newInstance(final ExpectedKeyVisual visual, final ExpectedKeyOutput output, - final ExpectedKey ... moreKeys) { + final ExpectedKey... moreKeys) { if (moreKeys.length == 0) { return new ExpectedKey(visual, output); } - return new ExpectedKeyWithMoreKeys(visual, output, moreKeys); + // The more keys are the extra keys that the main keyboard key may have in its long press + // popup keyboard. + // The additional more keys can be defined independently from other more keys. + // The position of the additional more keys in the long press popup keyboard can be + // controlled by specifying special marker "%" in the usual more keys definitions. + final ArrayList<ExpectedKey> moreKeysList = CollectionUtils.newArrayList(); + final ArrayList<ExpectedAdditionalMoreKey> additionalMoreKeys = + CollectionUtils.newArrayList(); + int firstAdditionalMoreKeyIndex = -1; + for (int index = 0; index < moreKeys.length; index++) { + final ExpectedKey moreKey = moreKeys[index]; + if (moreKey instanceof ExpectedAdditionalMoreKey) { + additionalMoreKeys.add((ExpectedAdditionalMoreKey) moreKey); + if (firstAdditionalMoreKeyIndex < 0) { + firstAdditionalMoreKeyIndex = index; + } + } else { + moreKeysList.add(moreKey); + } + } + if (additionalMoreKeys.isEmpty()) { + return new ExpectedKeyWithMoreKeys(visual, output, moreKeys); + } + final ExpectedKey[] moreKeysArray = moreKeysList.toArray( + new ExpectedKey[moreKeysList.size()]); + final ExpectedAdditionalMoreKey[] additionalMoreKeysArray = additionalMoreKeys.toArray( + new ExpectedAdditionalMoreKey[additionalMoreKeys.size()]); + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + visual, output, moreKeysArray, firstAdditionalMoreKeyIndex, + additionalMoreKeysArray); } private static final ExpectedKey[] EMPTY_KEYS = new ExpectedKey[0]; @@ -89,6 +120,27 @@ public class ExpectedKey { return EMPTY_KEYS; } + public ExpectedKey setMoreKeys(final ExpectedKey... moreKeys) { + return newInstance(mVisual, mOutput, moreKeys); + } + + public ExpectedKey setAdditionalMoreKeys( + final ExpectedAdditionalMoreKey... additionalMoreKeys) { + if (additionalMoreKeys.length == 0) { + return this; + } + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + mVisual, mOutput, EMPTY_KEYS, 0 /* additionalMoreKeysIndex */, additionalMoreKeys); + } + + public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) { + if (additionalMoreKeysIndex == 0) { + return this; + } + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + mVisual, mOutput, EMPTY_KEYS, additionalMoreKeysIndex); + } + protected ExpectedKey(final ExpectedKeyVisual visual, final ExpectedKeyOutput output) { mVisual = visual; mOutput = output; @@ -110,14 +162,14 @@ public class ExpectedKey { @Override public boolean equals(final Object object) { if (object instanceof ExpectedKey) { - final ExpectedKey key = (ExpectedKey)object; + final ExpectedKey key = (ExpectedKey) object; return mVisual.equalsTo(key.mVisual) && mOutput.equalsTo(key.mOutput) && Arrays.equals(getMoreKeys(), key.getMoreKeys()); } return false; } - private static int hashCode(final Object ... objects) { + private static int hashCode(final Object... objects) { return Arrays.hashCode(objects); } @@ -135,13 +187,42 @@ public class ExpectedKey { } /** + * This class represents an expected "additional more key". + * + * The additional more keys can be defined independently from other more keys. The position of + * the additional more keys in the long press popup keyboard can be controlled by specifying + * special marker "%" in the usual more keys definitions. + */ + public static class ExpectedAdditionalMoreKey extends ExpectedKey { + public static ExpectedAdditionalMoreKey newInstance(final String label) { + return new ExpectedAdditionalMoreKey(ExpectedKeyVisual.newInstance(label), + ExpectedKeyOutput.newInstance(label)); + } + + public static ExpectedAdditionalMoreKey newInstance(final ExpectedKey key) { + return new ExpectedAdditionalMoreKey(key.getVisual(), key.getOutput()); + } + + ExpectedAdditionalMoreKey(final ExpectedKeyVisual visual, final ExpectedKeyOutput output) { + super(visual, output); + } + + @Override + public ExpectedAdditionalMoreKey toUpperCase(final Locale locale) { + final ExpectedKey upperCaseKey = super.toUpperCase(locale); + return new ExpectedAdditionalMoreKey( + upperCaseKey.getVisual(), upperCaseKey.getOutput()); + } + } + + /** * This class represents an expected key that has "more keys". */ - private static final class ExpectedKeyWithMoreKeys extends ExpectedKey { + private static class ExpectedKeyWithMoreKeys extends ExpectedKey { private final ExpectedKey[] mMoreKeys; - ExpectedKeyWithMoreKeys(final ExpectedKeyVisual visual, - final ExpectedKeyOutput output, final ExpectedKey ... moreKeys) { + ExpectedKeyWithMoreKeys(final ExpectedKeyVisual visual, final ExpectedKeyOutput output, + final ExpectedKey... moreKeys) { super(visual, output); mMoreKeys = moreKeys; } @@ -162,15 +243,36 @@ public class ExpectedKey { } @Override + public ExpectedKey setAdditionalMoreKeys( + final ExpectedAdditionalMoreKey... additionalMoreKeys) { + if (additionalMoreKeys.length == 0) { + return this; + } + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual(), getOutput(), mMoreKeys, 0 /* additionalMoreKeysIndex */, + additionalMoreKeys); + } + + @Override + public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) { + if (additionalMoreKeysIndex == 0) { + return this; + } + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual(), getOutput(), mMoreKeys, additionalMoreKeysIndex); + } + + @Override public boolean equalsTo(final Key key) { if (getVisual().equalsTo(key) && getOutput().equalsTo(key)) { - final MoreKeySpec[] moreKeys = key.getMoreKeys(); + final MoreKeySpec[] moreKeySpecs = key.getMoreKeys(); + final ExpectedKey[] moreKeys = getMoreKeys(); // This key should have at least one "more key". - if (moreKeys == null || moreKeys.length != mMoreKeys.length) { + if (moreKeySpecs == null || moreKeySpecs.length != moreKeys.length) { return false; } - for (int index = 0; index < moreKeys.length; index++) { - if (!mMoreKeys[index].equalsTo(moreKeys[index])) { + for (int index = 0; index < moreKeySpecs.length; index++) { + if (!moreKeys[index].equalsTo(moreKeySpecs[index])) { return false; } } @@ -187,7 +289,77 @@ public class ExpectedKey { @Override public String toString() { - return super.toString() + "^" + Arrays.toString(mMoreKeys); + return super.toString() + "^" + Arrays.toString(getMoreKeys()); + } + } + + /** + * This class represents an expected key that has "more keys" and "additional more keys". + */ + private static final class ExpectedKeyWithMoreKeysAndAdditionalMoreKeys + extends ExpectedKeyWithMoreKeys { + private final ExpectedAdditionalMoreKey[] mAdditionalMoreKeys; + private final int mAdditionalMoreKeysIndex; + + ExpectedKeyWithMoreKeysAndAdditionalMoreKeys(final ExpectedKeyVisual visual, + final ExpectedKeyOutput output, final ExpectedKey[] moreKeys, + final int additionalMoreKeysIndex, + final ExpectedAdditionalMoreKey... additionalMoreKeys) { + super(visual, output, moreKeys); + mAdditionalMoreKeysIndex = additionalMoreKeysIndex; + mAdditionalMoreKeys = additionalMoreKeys; + } + + @Override + public ExpectedKey setMoreKeys(final ExpectedKey... moreKeys) { + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual(), getOutput(), moreKeys, mAdditionalMoreKeysIndex, + mAdditionalMoreKeys); + } + + @Override + public ExpectedKey setAdditionalMoreKeys( + final ExpectedAdditionalMoreKey... additionalMoreKeys) { + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual(), getOutput(), super.getMoreKeys(), mAdditionalMoreKeysIndex, + additionalMoreKeys); + } + + @Override + public ExpectedKey setAdditionalMoreKeysIndex(final int additionalMoreKeysIndex) { + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual(), getOutput(), super.getMoreKeys(), additionalMoreKeysIndex, + mAdditionalMoreKeys); + } + + @Override + public ExpectedKey toUpperCase(final Locale locale) { + final ExpectedKey[] moreKeys = super.getMoreKeys(); + final ExpectedKey[] upperCaseMoreKeys = new ExpectedKey[moreKeys.length]; + for (int i = 0; i < moreKeys.length; i++) { + upperCaseMoreKeys[i] = moreKeys[i].toUpperCase(locale); + } + final ExpectedAdditionalMoreKey[] upperCaseAdditionalMoreKeys = + new ExpectedAdditionalMoreKey[mAdditionalMoreKeys.length]; + for (int i = 0; i < mAdditionalMoreKeys.length; i++) { + upperCaseAdditionalMoreKeys[i] = mAdditionalMoreKeys[i].toUpperCase(locale); + } + return new ExpectedKeyWithMoreKeysAndAdditionalMoreKeys( + getVisual().toUpperCase(locale), getOutput().toUpperCase(locale), + upperCaseMoreKeys, mAdditionalMoreKeysIndex, upperCaseAdditionalMoreKeys); + } + + @Override + public ExpectedKey[] getMoreKeys() { + final ExpectedKey[] moreKeys = super.getMoreKeys(); + final ExpectedKey[] edittedMoreKeys = Arrays.copyOf( + moreKeys, moreKeys.length + mAdditionalMoreKeys.length); + System.arraycopy(edittedMoreKeys, mAdditionalMoreKeysIndex, + edittedMoreKeys, mAdditionalMoreKeysIndex + mAdditionalMoreKeys.length, + moreKeys.length - mAdditionalMoreKeysIndex); + System.arraycopy(mAdditionalMoreKeys, 0, edittedMoreKeys, mAdditionalMoreKeysIndex, + mAdditionalMoreKeys.length); + return edittedMoreKeys; } } } 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 c73fbf7b2..f068ad11d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java @@ -166,8 +166,35 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec replaceKeyOf(visual, new ReplaceJob() { @Override public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) { + return new ExpectedKey[] { oldKey.setMoreKeys(moreKeys) }; + } + @Override + public boolean stopAtFirstOccurrence() { + return true; + } + }); + } + + /** + * Set the "additional more keys position" of the key that has the specified label. + * @param label the label of the key to set the "additional more keys". + * @param additionalMoreKeysPosition the position in the "more keys" where + * "additional more keys" will be merged. The position starts from 1. + * @return this builder. + */ + public ExpectedKeyboardBuilder setAdditionalMoreKeysPositionOf(final String label, + final int additionalMoreKeysPosition) { + final int additionalMoreKeysIndex = additionalMoreKeysPosition - 1; + if (additionalMoreKeysIndex < 0) { + throw new RuntimeException("Illegal additional more keys position: " + + additionalMoreKeysPosition); + } + final ExpectedKeyVisual visual = ExpectedKeyVisual.newInstance(label); + replaceKeyOf(visual, new ReplaceJob() { + @Override + public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) { return new ExpectedKey[] { - ExpectedKey.newInstance(oldKey.getVisual(), oldKey.getOutput(), moreKeys) + oldKey.setAdditionalMoreKeysIndex(additionalMoreKeysIndex) }; } @Override @@ -175,6 +202,7 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec return true; } }); + return this; } /** diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java new file mode 100644 index 000000000..29264ff3b --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/EnglishCustomizer.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class EnglishCustomizer extends LayoutCustomizer { + EnglishCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + .setMoreKeysOf("e", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113") + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + .setMoreKeysOf("u", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B") + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + .setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC") + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + .setMoreKeysOf("o", + "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", "\u014D", + "\u00F5") + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + .setMoreKeysOf("a", + "\u00E0", "\u00E1", "\u00E2", "\u00E4", "\u00E6", "\u00E3", "\u00E5", + "\u0101") + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + .setMoreKeysOf("s", "\u00DF") + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + .setMoreKeysOf("c", "\u00E7") + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + .setMoreKeysOf("n", "\u00F1"); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java new file mode 100644 index 000000000..ab90267d0 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/FrenchCustomizer.java @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class FrenchCustomizer extends LayoutCustomizer { + FrenchCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + .setAdditionalMoreKeysPositionOf("a", 3) + .setMoreKeysOf("a", + "\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5", + "\u0101", "\u00AA") + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + .setAdditionalMoreKeysPositionOf("e", 5) + .setMoreKeysOf("e", + "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113") + // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS + .setMoreKeysOf("y", "\u00FF") + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + .setAdditionalMoreKeysPositionOf("u", 3) + .setMoreKeysOf("u", "\u00F9", "\u00FB", "\u00FC", "\u00FA", "\u016B") + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + .setAdditionalMoreKeysPositionOf("i", 2) + .setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B") + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + .setAdditionalMoreKeysPositionOf("o", 3) + .setMoreKeysOf("o", + "\u00F4", "\u0153", "\u00F6", "\u00F2", "\u00F3", "\u00F5", "\u00F8", + "\u014D", "\u00BA") + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D") + .setAdditionalMoreKeysPositionOf("c", 2); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java new file mode 100644 index 000000000..cd881406e --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/GermanCustomizer.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.Symbols; +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class GermanCustomizer extends LayoutCustomizer { + public GermanCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } + + @Override + public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; } + + @Override + public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; } + + @Override + public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + .setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117") + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + .setMoreKeysOf("o", + "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u00F8", + "\u014D") + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + .setMoreKeysOf("a", + "\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5", + "\u0101") + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161") + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + .setMoreKeysOf("n", "\u00F1", "\u0144"); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java index c51abc03e..555ec8971 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java @@ -28,6 +28,7 @@ import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase; import com.android.inputmethod.keyboard.layout.expected.ActualKeyboardBuilder; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey.ExpectedAdditionalMoreKey; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -72,6 +73,12 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase { return AbstractLayoutBase.key(key, moreKeys); } + // Helper method to create an {@link ExpectedAdditionalMoreKey} object for an + // "additional more key" that has the label. + public static ExpectedAdditionalMoreKey additionalMoreKey(final String label) { + return AbstractLayoutBase.additionalMoreKey(label); + } + // Helper method to create an {@link ExpectedKey} object for a "more key" that has the label. static ExpectedKey moreKey(final String label) { return AbstractLayoutBase.moreKey(label); @@ -150,7 +157,7 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase { Log.d(tag, "actual =\n" + ActualKeyboardBuilder.toString(actualKeyboard)); // Test both keyboards have the same number of rows. assertEquals(tag + " labels" - + "\nexpected=" + Arrays.deepToString(expectedKeyboard) + + "\nexpected=" + ExpectedKeyboardBuilder.toString(expectedKeyboard) + "\nactual =" + ActualKeyboardBuilder.toString(actualKeyboard), expectedKeyboard.length, actualKeyboard.length); for (int r = 0; r < actualKeyboard.length; r++) { diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java new file mode 100644 index 000000000..9edbcab69 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/NoLanguageCustomizer.java @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class NoLanguageCustomizer extends LayoutCustomizer { + NoLanguageCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX + .setMoreKeysOf("w", "\u0175") + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+0115: "ĕ" LATIN SMALL LETTER E WITH BREVE + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+011B: "ě" LATIN SMALL LETTER E WITH CARON + .setMoreKeysOf("e", + "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113", "\u0115", "\u0117", + "\u0119", "\u011B") + // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE + // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA + // U+0159: "ř" LATIN SMALL LETTER R WITH CARON + .setMoreKeysOf("r", "\u0155", "\u0157", "\u0159") + // U+00FE: "þ" LATIN SMALL LETTER THORN + // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA + // U+0165: "ť" LATIN SMALL LETTER T WITH CARON + // U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE + .setMoreKeysOf("t", "\u00FE", "\u0163", "\u0165", "\u0167") + // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE + // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX + // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS + // U+0133: "ij" LATIN SMALL LIGATURE IJ + .setMoreKeysOf("y", "\u00FD", "\u0177", "\u00FF", "\u0133") + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+0169: "ũ" LATIN SMALL LETTER U WITH TILDE + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + // U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE + // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE + // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE + // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK + .setMoreKeysOf("u", + "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u0169", "\u016B", "\u016D", + "\u016F", "\u0171", "\u0173") + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + // U+012D: "ĭ" LATIN SMALL LETTER I WITH BREVE + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+0133: "ij" LATIN SMALL LIGATURE IJ + .setMoreKeysOf("i", + "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u012B", "\u012D", + "\u012F", "\u0131", "\u0133") + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+014F: "ŏ" LATIN SMALL LETTER O WITH BREVE + // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + .setMoreKeysOf("o", + "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u00F8", "\u014D", + "\u014F", "\u0151", "\u0153", "\u00BA") + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE + // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + .setMoreKeysOf("a", + "\u00E0", "\u00E1", "\u00E2", "\u00E3", "\u00E4", "\u00E5", "\u00E6", + "\u0101", "\u0103", "\u0105", "\u00AA") + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX + // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + // U+017F: "ſ" LATIN SMALL LETTER LONG S + .setMoreKeysOf("s", "\u00DF", "\u015B", "\u015D", "\u015F", "\u0161", "\u017F") + // U+010F: "ď" LATIN SMALL LETTER D WITH CARON + // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE + // U+00F0: "ð" LATIN SMALL LETTER ETH + .setMoreKeysOf("d", "\u010F", "\u0111", "\u00F0") + // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX + // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE + // U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE + // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA + .setMoreKeysOf("g", "\u011D", "\u011F", "\u0121", "\u0123") + // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX + .setMoreKeysOf("h", "\u0125") + // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX + .setMoreKeysOf("j", "\u0135") + // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA + // U+0138: "ĸ" LATIN SMALL LETTER KRA + .setMoreKeysOf("k", "\u0137", "\u0138") + // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE + // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA + // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON + // U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT + // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE + .setMoreKeysOf("l", "\u013A", "\u013C", "\u013E", "\u0140", "\u0142") + // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE + // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE + // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON + .setMoreKeysOf("z", "\u017A", "\u017C", "\u017E") + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX + // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + .setMoreKeysOf("c", "\u00E7", "\u0107", "\u0109", "\u010B", "\u010D") + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA + // U+0148: "ň" LATIN SMALL LETTER N WITH CARON + // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE + // U+014B: "ŋ" LATIN SMALL LETTER ENG + .setMoreKeysOf("n", "\u00F1", "\u0144", "\u0146", "\u0148", "\u0149", "\u014B"); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java new file mode 100644 index 000000000..629e8cb8b --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/PortugueseCustomizer.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class PortugueseCustomizer extends LayoutCustomizer { + PortugueseCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + .setMoreKeysOf("e", + "\u00E9", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113", "\u00EB") + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + .setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EC", "\u00EF", "\u012F", "\u012B") + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + .setMoreKeysOf("o", + "\u00F3", "\u00F5", "\u00F4", "\u00F2", "\u00F6", "\u0153", "\u00F8", + "\u014D", "\u00BA") + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + .setMoreKeysOf("a", + "\u00E1", "\u00E3", "\u00E0", "\u00E2", "\u00E4", "\u00E5", "\u00E6", + "\u00AA") + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + .setMoreKeysOf("c", "\u00E7", "\u010D", "\u0107"); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java new file mode 100644 index 000000000..da4a83c73 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/SpanishCustomizer.java @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.Spanish; +import com.android.inputmethod.keyboard.layout.expected.AbstractLayoutBase; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +class SpanishCustomizer extends LayoutCustomizer { + SpanishCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) { + return isPhone ? PHONE_PUNCTUATION_MORE_KEYS + : LayoutBase.TABLET_PUNCTUATION_MORE_KEYS; + } + + // Punctuation more keys for phone form factor. + private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = AbstractLayoutBase.joinKeys( + // U+00A1: "¡" INVERTED EXCLAMATION MARK + // U+00BF: "¿" INVERTED QUESTION MARK + "\u00A1", ";", "/", "(", ")", "#", "!", ",", "?", + "\u00BF", "&", "%", "+", "\"", "-", ":", "'", "@"); + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return builder + // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON + .setMoreKeysOf("e", + "\u00E9", "\u00E8", "\u00EB", "\u00EA", "\u0119", "\u0117", "\u0113") + // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") + // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON + .setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B") + // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + // U+0153: "œ" LATIN SMALL LIGATURE OE + // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + // U+00BA: "º" MASCULINE ORDINAL INDICATOR + .setMoreKeysOf("o", + "\u00F3", "\u00F2", "\u00F6", "\u00F4", "\u00F5", "\u00F8", "\u0153", + "\u014D", "\u00BA") + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + // U+00AA: "ª" FEMININE ORDINAL INDICATOR + .setMoreKeysOf("a", + "\u00E1", "\u00E0", "\u00E4", "\u00E2", "\u00E3", "\u00E5", "\u0105", + "\u00E6", "\u0101", "\u00AA") + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + .replaceKeyOfLabel(Spanish.ROW2_10, "\u00F1") + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + // U+010D: "č" LATIN SMALL LETTER C WITH CARON + .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D") + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE + .setMoreKeysOf("n", "\u00F1", "\u0144"); + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java index c98b4a5a9..cd2259888 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAfrikaans.java @@ -50,17 +50,16 @@ public final class TestsAfrikaans extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", - "\u0113") + "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FB", "\u00FC", "\u00F9", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FB", "\u00FC", "\u00F9", "\u016B") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("y", "6", "\u00FD", "\u0133") + .setMoreKeysOf("y", "\u00FD", "\u0133") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -69,8 +68,7 @@ public final class TestsAfrikaans extends LayoutTestsBase { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+0133: "ij" LATIN SMALL LIGATURE IJ .setMoreKeysOf("i", - "8", "\u00ED", "\u00EC", "\u00EF", "\u00EE", "\u012F", "\u012B", - "\u0133") + "\u00ED", "\u00EC", "\u00EF", "\u00EE", "\u012F", "\u012B", "\u0133") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -80,8 +78,8 @@ public final class TestsAfrikaans extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F4", "\u00F6", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") + "\u00F3", "\u00F4", "\u00F6", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java index 84d5a3627..f5317e269 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsAzerbaijaniAZ.java @@ -43,13 +43,13 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase { public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { return builder // U+0259: "ə" LATIN SMALL LETTER SCHWA - .setMoreKeysOf("e", "3", "\u0259") + .setMoreKeysOf("e", "\u0259") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") + .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") // U+0131: "ı" LATIN SMALL LETTER DOTLESS I // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -58,8 +58,7 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase { // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON .setMoreKeysOf("i", - "8", "\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") + "\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+0153: "œ" LATIN SMALL LIGATURE OE @@ -69,8 +68,8 @@ public final class TestsAzerbaijaniAZ extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D") + "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", "\u00F8", + "\u014D") // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX .setMoreKeysOf("a", "\u00E2") // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java new file mode 100644 index 000000000..bef18c5d5 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBasqueES.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; +import com.android.inputmethod.keyboard.layout.Spanish; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * eu_ES: Basque (Spain)/spanish + */ +@SmallTest +public class TestsBasqueES extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("eu", "ES"); + private static final LayoutBase LAYOUT = new Spanish(new BasqueESCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class BasqueESCustomizer extends EuroCustomizer { + private final SpanishCustomizer mSpanishCustomizer; + + public BasqueESCustomizer(final Locale locale) { + super(locale); + mSpanishCustomizer = new SpanishCustomizer(locale); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mSpanishCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java index 476841c23..c5238d54f 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBelarusianBY.java @@ -56,15 +56,15 @@ public final class TestsBelarusianBY extends LayoutTestsBase { return builder // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0451: "ё" CYRILLIC SMALL LETTER IO - .setMoreKeysOf("\u0435", "5", "\u0451") + .setMoreKeysOf("\u0435", "\u0451") // U+045E: "ў" CYRILLIC SMALL LETTER SHORT U - .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u045E", moreKey("9"))) + .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u045E", additionalMoreKey("9"))) // U+044B: "ы" CYRILLIC SMALL LETTER YERU - .replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B")) + .replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B") // U+044D: "э" CYRILLIC SMALL LETTER E - .replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D")) + .replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D") // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I - .replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0456")) + .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0456") // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN .setMoreKeysOf("\u044C", "\u044A"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java index ec03f0d92..988eb81a3 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCatalan.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Spanish; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; @@ -37,7 +37,7 @@ public class TestsCatalan extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class CatalanCustomizer extends EuroLayoutCustomizer { + private static class CatalanCustomizer extends EuroCustomizer { public CatalanCustomizer(final Locale locale) { super(locale); } @Override @@ -66,22 +66,20 @@ public class TestsCatalan extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E8", "\u00E9", "\u00EB", "\u00EA", "\u0119", "\u0117", - "\u0113") + "\u00E8", "\u00E9", "\u00EB", "\u00EA", "\u0119", "\u0117", "\u0113") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", - "8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B") + .setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B") // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -92,8 +90,8 @@ public class TestsCatalan extends LayoutTestsBase { // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR .setMoreKeysOf("o", - "9", "\u00F2", "\u00F3", "\u00F6", "\u00F4", "\u00F5", "\u00F8", - "\u0153", "\u014D", "\u00BA") + "\u00F2", "\u00F3", "\u00F6", "\u00F4", "\u00F5", "\u00F8", "\u0153", + "\u014D", "\u00BA") // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS @@ -111,7 +109,7 @@ public class TestsCatalan extends LayoutTestsBase { // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE .setMoreKeysOf("l", "l\u00B7l", "\u0142") // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - .replaceKeyOfLabel(Spanish.ROW2_10, key("\u00E7")) + .replaceKeyOfLabel(Spanish.ROW2_10, "\u00E7") // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE // U+010D: "č" LATIN SMALL LETTER C WITH CARON diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java index cf76de52e..8575ef219 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCroatian.java @@ -59,7 +59,7 @@ public final class TestsCroatian extends LayoutTestsBase { // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - .setMoreKeysOf("z", "6", "\u017E", "\u017A", "\u017C") + .setMoreKeysOf("z", "\u017E", "\u017A", "\u017C") // U+0161: "š" LATIN SMALL LETTER S WITH CARON // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE // U+00DF: "ß" LATIN SMALL LETTER SHARP S diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java index 5cf47401d..f4794707f 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsCzech.java @@ -65,32 +65,30 @@ public final class TestsCzech extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", - "\u0117", "\u0113") + "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", + "\u0113") // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - .setMoreKeysOf("r", "4", "\u0159") + .setMoreKeysOf("r", "\u0159") // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - .setMoreKeysOf("t", "5", "\u0165") + .setMoreKeysOf("t", "\u0165") // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - .setMoreKeysOf("z", "6", "\u017E", "\u017A", "\u017C") + .setMoreKeysOf("z", "\u017E", "\u017A", "\u017C") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", - "7", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", - "8", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B") + .setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -100,8 +98,8 @@ public final class TestsCzech extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") + "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java index 050a0c472..85c63a128 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDanish.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Nordic; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsDanish extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class DanishCustomizer extends EuroLayoutCustomizer { + private static class DanishCustomizer extends EuroCustomizer { public DanishCustomizer(final Locale locale) { super(locale); } @Override @@ -58,29 +58,28 @@ public final class TestsDanish extends LayoutTestsBase { return builder // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - .setMoreKeysOf("e", "3", "\u00E9", "\u00EB") + .setMoreKeysOf("e", "\u00E9", "\u00EB") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - .setMoreKeysOf("i", "8", "\u00ED", "\u00EF") + .setMoreKeysOf("i", "\u00ED", "\u00EF") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", - "9", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D") + .setMoreKeysOf("o", "\u00F3", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u014D") // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - .replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5")) + .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5") // U+00E6: "æ" LATIN SMALL LETTER AE // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00E6", moreKey("\u00E4"))) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java index e6e3378a3..1730f66be 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutch.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsDutch extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class DutchCustomizer extends EuroLayoutCustomizer { + static class DutchCustomizer extends EuroCustomizer { public DutchCustomizer(final Locale locale) { super(locale); } @Override @@ -50,6 +50,17 @@ public final class TestsDutch extends LayoutTestsBase { @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { return builder + // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E6: "æ" LATIN SMALL LETTER AE + // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + .setMoreKeysOf("a", + "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", "\u00E5", + "\u0101") // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -58,16 +69,15 @@ public final class TestsDutch extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", - "\u0113") + "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113") // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("y", "6", "\u0133") + .setMoreKeysOf("y", "\u0133") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -76,8 +86,7 @@ public final class TestsDutch extends LayoutTestsBase { // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+0133: "ij" LATIN SMALL LIGATURE IJ .setMoreKeysOf("i", - "8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", - "\u0133") + "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", "\u0133") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -87,19 +96,8 @@ public final class TestsDutch extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", "\u00E5", - "\u0101") + "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D") // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE .setMoreKeysOf("n", "\u00F1", "\u0144"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java index aa706f601..31adf7a8d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsDutchBE.java @@ -20,10 +20,7 @@ import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.Azerty; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; -import com.android.inputmethod.keyboard.layout.Symbols; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.tests.TestsDutch.DutchCustomizer; import java.util.Locale; @@ -33,76 +30,8 @@ import java.util.Locale; @SmallTest public final class TestsDutchBE extends LayoutTestsBase { private static final Locale LOCALE = new Locale("nl", "BE"); - private static final LayoutBase LAYOUT = new Azerty(new DutchBECustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Azerty(new DutchCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - private static class DutchBECustomizer extends EuroLayoutCustomizer { - public DutchBECustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_L9R; } - - @Override - public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_L9R; } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "1", "\u00E1", "\u00E4", "\u00E2", "\u00E0", "\u00E6", "\u00E3", - "\u00E5", "\u0101") - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "3", "\u00E9", "\u00EB", "\u00EA", "\u00E8", "\u0119", "\u0117", - "\u0113") - // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("y", "6", "\u0133") - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("i", - "8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", "\u012B", - "\u0133") - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - .setMoreKeysOf("n", "\u00F1", "\u0144"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java new file mode 100644 index 000000000..a05269312 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishDvorak.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.Dvorak; +import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * en_US: English (United States)/dvorak + */ +@SmallTest +public class TestsEnglishDvorak extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("en", "US"); + private static final LayoutBase LAYOUT = new Dvorak(new EnglishDvorakCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class EnglishDvorakCustomizer extends DvorakCustomizer { + private final EnglishCustomizer mEnglishCustomizer; + + EnglishDvorakCustomizer(final Locale locale) { + super(locale); + mEnglishCustomizer = new EnglishCustomizer(locale); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mEnglishCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java index 4789507d8..c0dcbdc06 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUK.java @@ -36,7 +36,7 @@ public final class TestsEnglishUK extends TestsEnglishUS { @Override LayoutBase getLayout() { return LAYOUT; } - private static class EnglishUKCustomizer extends EnglishUSCustomizer { + private static class EnglishUKCustomizer extends EnglishCustomizer { public EnglishUKCustomizer(final Locale locale) { super(locale); } @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java index 991187aab..6ea8f6000 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java @@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -31,63 +29,8 @@ import java.util.Locale; @SmallTest public class TestsEnglishUS extends LayoutTestsBase { private static final Locale LOCALE = new Locale("en", "US"); - private static final LayoutBase LAYOUT = new Qwerty(new EnglishUSCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwerty(new EnglishCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - // TODO: Make this as generic English customizer. - static class EnglishUSCustomizer extends LayoutCustomizer { - public EnglishUSCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113") - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B") - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - .setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC") - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - .setMoreKeysOf("o", - "9", "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", - "\u014D", "\u00F5") - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "\u00E0", "\u00E1", "\u00E2", "\u00E4", "\u00E6", "\u00E3", "\u00E5", - "\u0101") - // U+00DF: "ß" LATIN SMALL LETTER SHARP S - .setMoreKeysOf("s", "\u00DF") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - .setMoreKeysOf("c", "\u00E7") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - .setMoreKeysOf("n", "\u00F1"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java index a54601b6b..6a44187c9 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEsperanto.java @@ -43,11 +43,12 @@ public class TestsEsperanto extends LayoutTestsBase { public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { return builder // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX - .replaceKeyOfLabel("q", key("\u015D", moreKey("1"), moreKey("q"))) + .replaceKeyOfLabel("q", key("\u015D", joinMoreKeys( + additionalMoreKey("1"), "q"))) // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX - .replaceKeyOfLabel("w", key("\u011D", - moreKey("2"), moreKey("w"), moreKey("\u0175"))) + .replaceKeyOfLabel("w", key("\u011D", joinMoreKeys( + additionalMoreKey("2"), "w", "\u0175"))) // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+011B: "ě" LATIN SMALL LETTER E WITH CARON // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -57,25 +58,24 @@ public class TestsEsperanto extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", - "\u0117", "\u0113") + "\u00E9", "\u011B", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", + "\u0113") // U+0159: "ř" LATIN SMALL LETTER R WITH CARON // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - .setMoreKeysOf("r", "4", "\u0159", "\u0155", "\u0157") + .setMoreKeysOf("r", "\u0159", "\u0155", "\u0157") // U+0165: "ť" LATIN SMALL LETTER T WITH CARON // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE - .setMoreKeysOf("t", "5", "\u0165", "\u021B", "\u0163", "\u0167") + .setMoreKeysOf("t", "\u0165", "\u021B", "\u0163", "\u0167") // U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS // U+00FE: "þ" LATIN SMALL LETTER THORN - .replaceKeyOfLabel("y", key("\u016D", - moreKey("6"), moreKey("y"), moreKey("\u00FD"), moreKey("\u0177"), - moreKey("\u00FF"), moreKey("\u00FE"))) + .replaceKeyOfLabel("y", key("\u016D", joinMoreKeys( + additionalMoreKey("6"), "y", "\u00FD", "\u0177", "\u00FF", "\u00FE"))) // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX @@ -87,8 +87,8 @@ public class TestsEsperanto extends LayoutTestsBase { // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00B5: "µ" MICRO SIGN .setMoreKeysOf("u", - "7", "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B", - "\u0169", "\u0171", "\u0173", "\u00B5") + "\u00FA", "\u016F", "\u00FB", "\u00FC", "\u00F9", "\u016B", "\u0169", + "\u0171", "\u0173", "\u00B5") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -99,8 +99,8 @@ public class TestsEsperanto extends LayoutTestsBase { // U+0131: "ı" LATIN SMALL LETTER DOTLESS I // U+0133: "ij" LATIN SMALL LIGATURE IJ .setMoreKeysOf("i", - "8", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u00EC", "\u012F", - "\u012B", "\u0131", "\u0133") + "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u00EC", "\u012F", "\u012B", + "\u0131", "\u0133") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -112,8 +112,8 @@ public class TestsEsperanto extends LayoutTestsBase { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00BA: "º" MASCULINE ORDINAL INDICATOR .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D", "\u0151", "\u00BA") + "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D", "\u0151", "\u00BA") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX @@ -162,7 +162,7 @@ public class TestsEsperanto extends LayoutTestsBase { // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE .setMoreKeysOf("l", "\u013A", "\u013C", "\u013E", "\u0140", "\u0142") // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX - .replaceKeyOfLabel(Spanish.ROW2_10, key("\u0135")) + .replaceKeyOfLabel(Spanish.ROW2_10, "\u0135") // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java index be3786a32..865e9ea17 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEstonianEE.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Nordic; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsEstonianEE extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class EstonianEECustomizer extends EuroLayoutCustomizer { + private static class EstonianEECustomizer extends EuroCustomizer { public EstonianEECustomizer(final Locale locale) { super(locale); } @@ -61,18 +61,18 @@ public final class TestsEstonianEE extends LayoutTestsBase { // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK // U+011B: "ě" LATIN SMALL LETTER E WITH CARON .setMoreKeysOf("e", - "3", "\u0113", "\u00E8", "\u0117", "\u00E9", "\u00EA", "\u00EB", - "\u0119", "\u011B") + "\u0113", "\u00E8", "\u0117", "\u00E9", "\u00EA", "\u00EB", "\u0119", + "\u011B") // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA // U+0159: "ř" LATIN SMALL LETTER R WITH CARON // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - .setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155") + .setMoreKeysOf("r", "\u0157", "\u0159", "\u0155") // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - .setMoreKeysOf("t", "5", "\u0163", "\u0165") + .setMoreKeysOf("t", "\u0163", "\u0165") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK @@ -82,8 +82,8 @@ public final class TestsEstonianEE extends LayoutTestsBase { // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE .setMoreKeysOf("u", - "7", "\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", - "\u016F", "\u0171") + "\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u016F", + "\u0171") // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK @@ -92,8 +92,7 @@ public final class TestsEstonianEE extends LayoutTestsBase { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I .setMoreKeysOf("i", - "8", "\u012B", "\u00EC", "\u012F", "\u00ED", "\u00EE", "\u00EF", - "\u0131") + "\u012B", "\u00EC", "\u012F", "\u00ED", "\u00EE", "\u00EF", "\u0131") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -103,15 +102,15 @@ public final class TestsEstonianEE extends LayoutTestsBase { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE .setMoreKeysOf("o", - "9", "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", - "\u0151", "\u00F8") + "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", "\u0151", + "\u00F8") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - .replaceKeyOfLabel(Nordic.ROW1_11, key("\u00FC")) + .replaceKeyOfLabel(Nordic.ROW1_11, "\u00FC") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", moreKey("\u00F5"))) // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4")) + .replaceKeyOfLabel(Nordic.ROW2_11, "\u00E4") // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java index 20ecd5164..ff32da117 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFinnish.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Nordic; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; @@ -36,14 +36,14 @@ public final class TestsFinnish extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class FinnishCustomizer extends EuroLayoutCustomizer { + private static class FinnishCustomizer extends EuroCustomizer { public FinnishCustomizer(final Locale locale) { super(locale); } @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { return builder // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - .setMoreKeysOf("u", "7", "\u00FC") + .setMoreKeysOf("u", "\u00FC") // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -52,10 +52,9 @@ public final class TestsFinnish extends LayoutTestsBase { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", - "\u014D") + "\u00F8", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", "\u014D") // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - .replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5")) + .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", moreKey("\u00F8"))) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java index 5f8ecd6e1..7ced1fb7b 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrench.java @@ -20,8 +20,8 @@ import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.Azerty; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; import java.util.Locale; @@ -31,71 +31,25 @@ import java.util.Locale; @SmallTest public final class TestsFrench extends LayoutTestsBase { private static final Locale LOCALE = new Locale("fr"); - private static final LayoutBase LAYOUT = new Azerty(new FrenchCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Azerty(new FrenchEuroCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - private static class FrenchCustomizer extends EuroLayoutCustomizer { - public FrenchCustomizer(final Locale locale) { super(locale); } + static final class FrenchEuroCustomizer extends FrenchCustomizer { + private final EuroCustomizer mEuroCustomizer; + + public FrenchEuroCustomizer(final Locale locale) { + super(locale); + mEuroCustomizer = new EuroCustomizer(locale); + } + + @Override + public final ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); } @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E0", "\u00E2", "1", "\u00E6", "\u00E1", "\u00E4", "\u00E3", - "\u00E5", "\u0101", "\u00AA") - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117", - "\u0113") - // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FF") - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B") - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D", "\u00BA") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D"); + public final ExpectedKey[] getOtherCurrencyKeys() { + return mEuroCustomizer.getOtherCurrencyKeys(); } } }
\ No newline at end of file diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java index d6babc841..9b3cd1ee2 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCA.java @@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -31,71 +29,8 @@ import java.util.Locale; @SmallTest public final class TestsFrenchCA extends LayoutTestsBase { private static final Locale LOCALE = new Locale("fr", "CA"); - private static final LayoutBase LAYOUT = new Qwerty(new FrenchCACustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwerty(new FrenchCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - private static class FrenchCACustomizer extends LayoutCustomizer { - public FrenchCACustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117", - "\u0113") - // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FF") - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B") - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D", "\u00BA") - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5", - "\u0101", "\u00AA") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java index 5a56ad1d4..2598aa3bf 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchCH.java @@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Swiss; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; @@ -36,75 +35,22 @@ public final class TestsFrenchCH extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class FrenchCHCustomizer extends LayoutCustomizer { + private static class FrenchCHCustomizer extends FrenchCustomizer { public FrenchCHCustomizer(final Locale locale) { super(locale); } @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + super.setAccentedLetters(builder); return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117", - "\u0113") - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B") - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D", "\u00BA") // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS .replaceKeyOfLabel(Swiss.ROW1_11, key("\u00E8", moreKey("\u00FC"))) - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5", - "\u0101", "\u00AA") // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS .replaceKeyOfLabel(Swiss.ROW2_10, key("\u00E9", moreKey("\u00F6"))) // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - .replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E0", moreKey("\u00E4"))) - // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "\u00FF") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D"); + .replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E0", moreKey("\u00E4"))); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java new file mode 100644 index 000000000..33d1445a4 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchDvorak.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.Dvorak; +import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.tests.TestsFrench.FrenchEuroCustomizer; + +import java.util.Locale; + +/** + * fr: French/dvorak + */ +@SmallTest +public final class TestsFrenchDvorak extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("fr"); + private static final LayoutBase LAYOUT = new Dvorak(new FrenchDvorakCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class FrenchDvorakCustomizer extends DvorakCustomizer { + private final FrenchEuroCustomizer mFrenchEuroCustomizer; + + public FrenchDvorakCustomizer(final Locale locale) { + super(locale); + mFrenchEuroCustomizer = new FrenchEuroCustomizer(locale); + } + + @Override + public ExpectedKey getCurrencyKey() { return mFrenchEuroCustomizer.getCurrencyKey(); } + + @Override + public ExpectedKey[] getOtherCurrencyKeys() { + return mFrenchEuroCustomizer.getOtherCurrencyKeys(); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mFrenchEuroCustomizer.setAccentedLetters(builder); + } + } +}
\ No newline at end of file diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java index 0582b0cf0..6ab28704a 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsFrenchQwertz.java @@ -19,9 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwertz; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.tests.TestsFrench.FrenchEuroCustomizer; import java.util.Locale; @@ -31,71 +30,8 @@ import java.util.Locale; @SmallTest public final class TestsFrenchQwertz extends LayoutTestsBase { private static final Locale LOCALE = new Locale("fr"); - private static final LayoutBase LAYOUT = new Qwertz(new FrenchQwertzCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwertz(new FrenchEuroCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - private static class FrenchQwertzCustomizer extends EuroLayoutCustomizer { - public FrenchQwertzCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "\u00E9", "\u00E8", "\u00EA", "\u00EB", "3", "\u0119", "\u0117", - "\u0113") - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "\u00F9", "\u00FB", "7", "\u00FC", "\u00FA", "\u016B") - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "\u00EE", "8", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "\u00F4", "\u0153", "9", "\u00F6", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D", "\u00BA") - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E0", "\u00E2", "\u00E6", "\u00E1", "\u00E4", "\u00E3", "\u00E5", - "\u0101", "\u00AA") - // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "\u00FF") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java new file mode 100644 index 000000000..1472828a4 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGalicianES.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; +import com.android.inputmethod.keyboard.layout.Spanish; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * gl_ES: Galician (Spain)/spanish + */ +@SmallTest +public class TestsGalicianES extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("gl", "ES"); + private static final LayoutBase LAYOUT = new Spanish(new GalicianESCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class GalicianESCustomizer extends EuroCustomizer { + private final SpanishCustomizer mSpanishCustomizer; + + public GalicianESCustomizer(final Locale locale) { + super(locale); + mSpanishCustomizer = new SpanishCustomizer(locale); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mSpanishCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java index 7c12b37de..6f7571197 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGerman.java @@ -19,11 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwertz; -import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -33,70 +31,25 @@ import java.util.Locale; @SmallTest public final class TestsGerman extends LayoutTestsBase { private static final Locale LOCALE = new Locale("de"); - private static final LayoutBase LAYOUT = new Qwertz(new GermanCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwertz(new GermanEuroCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - private static class GermanCustomizer extends EuroLayoutCustomizer { - public GermanCustomizer(final Locale locale) { super(locale); } + static class GermanEuroCustomizer extends GermanCustomizer { + final EuroCustomizer mEuroCustomizer; - @Override - public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; } + public GermanEuroCustomizer(final Locale locale) { + super(locale); + mEuroCustomizer = new EuroCustomizer(locale); + } @Override - public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; } + public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); } @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - .setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117") - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", - "9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", - "\u00F8", "\u014D") - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5", - "\u0101") - // U+00DF: "ß" LATIN SMALL LETTER SHARP S - // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - // U+0161: "š" LATIN SMALL LETTER S WITH CARON - .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - .setMoreKeysOf("n", "\u00F1", "\u0144"); + public ExpectedKey[] getOtherCurrencyKeys() { + return mEuroCustomizer.getOtherCurrencyKeys(); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java index 001c3c40a..7deb00bb4 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanCH.java @@ -19,10 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Swiss; -import com.android.inputmethod.keyboard.layout.Symbols; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -38,74 +35,22 @@ public final class TestsGermanCH extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class GermanCHCustomizer extends LayoutCustomizer { + private static class GermanCHCustomizer extends GermanCustomizer { public GermanCHCustomizer(final Locale locale) { super(locale); } @Override - public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; } - - @Override - public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; } - - @Override public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + super.setAccentedLetters(builder); return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - .setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117") - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", - "9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", - "\u00F8", "\u014D") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE .replaceKeyOfLabel(Swiss.ROW1_11, key("\u00FC", moreKey("\u00E8"))) - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5", - "\u0101") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE .replaceKeyOfLabel(Swiss.ROW2_10, key("\u00F6", moreKey("\u00E9"))) // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - .replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E4", moreKey("\u00E0"))) - // U+00DF: "ß" LATIN SMALL LETTER SHARP S - // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - // U+0161: "š" LATIN SMALL LETTER S WITH CARON - .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - .setMoreKeysOf("n", "\u00F1", "\u0144"); + .replaceKeyOfLabel(Swiss.ROW2_11, key("\u00E4", moreKey("\u00E0"))); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java new file mode 100644 index 000000000..b28d5cfcf --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanDvorak.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.Dvorak; +import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.Symbols; +import com.android.inputmethod.keyboard.layout.SymbolsShifted; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * de: German/dvorak + */ +@SmallTest +public final class TestsGermanDvorak extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("de"); + private static final LayoutBase LAYOUT = new Dvorak(new GermanDvorakCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + static class GermanDvorakCustomizer extends DvorakCustomizer { + final GermanCustomizer mGermanCustomizer; + + public GermanDvorakCustomizer(final Locale locale) { + super(locale); + mGermanCustomizer = new GermanCustomizer(locale); + } + + @Override + public ExpectedKey getCurrencyKey() { return Symbols.CURRENCY_EURO; } + + @Override + public ExpectedKey[] getOtherCurrencyKeys() { + return SymbolsShifted.CURRENCIES_OTHER_THAN_EURO; + } + + @Override + public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } + + @Override + public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; } + + @Override + public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; } + + @Override + public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mGermanCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java index 618485dba..19ae5a3f5 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsGermanQwerty.java @@ -19,11 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.Symbols; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.tests.TestsGerman.GermanEuroCustomizer; import java.util.Locale; @@ -33,70 +30,8 @@ import java.util.Locale; @SmallTest public final class TestsGermanQwerty extends LayoutTestsBase { private static final Locale LOCALE = new Locale("de"); - private static final LayoutBase LAYOUT = new Qwerty(new GermanQwertyCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwerty(new GermanEuroCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - private static class GermanQwertyCustomizer extends EuroLayoutCustomizer { - public GermanQwertyCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKey[] getDoubleQuoteMoreKeys() { return Symbols.DOUBLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getSingleQuoteMoreKeys() { return Symbols.SINGLE_QUOTES_R9L; } - - @Override - public ExpectedKey[] getDoubleAngleQuoteKeys() { return Symbols.DOUBLE_ANGLE_QUOTES_RL; } - - @Override - public ExpectedKey[] getSingleAngleQuoteKeys() { return Symbols.SINGLE_ANGLE_QUOTES_RL; } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - .setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0117") - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", - "9", "\u00F6", "\u00F4", "\u00F2", "\u00F3", "\u00F5", "\u0153", - "\u00F8", "\u014D") - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - .setMoreKeysOf("a", - "\u00E4", "\u00E2", "\u00E0", "\u00E1", "\u00E6", "\u00E3", "\u00E5", - "\u0101") - // U+00DF: "ß" LATIN SMALL LETTER SHARP S - // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - // U+0161: "š" LATIN SMALL LETTER S WITH CARON - .setMoreKeysOf("s", "\u00DF", "\u015B", "\u0161") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - .setMoreKeysOf("n", "\u00F1", "\u0144"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java index 942c07a2a..efc95dcf9 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHungarian.java @@ -64,24 +64,21 @@ public final class TestsHungarian extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", - "\u0113") + "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u0171", "\u00FB", "\u00F9", - "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u0171", "\u00FB", "\u00F9", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", - "\u012B") + .setMoreKeysOf("i", "\u00ED", "\u00EE", "\u00EF", "\u00EC", "\u012F", "\u012B") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE @@ -92,8 +89,8 @@ public final class TestsHungarian extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u0151", "\u00F4", "\u00F2", "\u00F5", - "\u0153", "\u00F8", "\u014D") + "\u00F3", "\u00F6", "\u0151", "\u00F4", "\u00F2", "\u00F5", "\u0153", + "\u00F8", "\u014D") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java index c10c1a905..62b111e6a 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsIcelandic.java @@ -58,27 +58,25 @@ public final class TestsIcelandic extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u00EB", "\u00E8", "\u00EA", "\u0119", "\u0117", - "\u0113") + "\u00E9", "\u00EB", "\u00E8", "\u00EA", "\u0119", "\u0117", "\u0113") // U+00FE: "þ" LATIN SMALL LETTER THORN - .setMoreKeysOf("t", "5", "\u00FE") + .setMoreKeysOf("t", "\u00FE") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") + .setMoreKeysOf("u", "\u00FA", "\u00FC", "\u00FB", "\u00F9", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00ED", "\u00EF", "\u00EE", "\u00EC", "\u012F", - "\u012B") + .setMoreKeysOf("i", "\u00ED", "\u00EF", "\u00EE", "\u00EC", "\u012F", "\u012B") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -88,8 +86,8 @@ public final class TestsIcelandic extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") + "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+00E6: "æ" LATIN SMALL LETTER AE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java index 1ba54b1e3..4a2200364 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsItalian.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; @@ -36,7 +36,7 @@ public final class TestsItalian extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class ItalianCustomizer extends EuroLayoutCustomizer { + private static class ItalianCustomizer extends EuroCustomizer { public ItalianCustomizer(final Locale locale) { super(locale); } @Override @@ -50,22 +50,20 @@ public final class TestsItalian extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119", "\u0117", - "\u0113") + "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113") // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016B") + .setMoreKeysOf("u", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016B") // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u012F", - "\u012B") + .setMoreKeysOf("i", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u012F", "\u012B") // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -76,8 +74,8 @@ public final class TestsItalian extends LayoutTestsBase { // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00BA: "º" MASCULINE ORDINAL INDICATOR .setMoreKeysOf("o", - "9", "\u00F2", "\u00F3", "\u00F4", "\u00F6", "\u00F5", "\u0153", - "\u00F8", "\u014D", "\u00BA") + "\u00F2", "\u00F3", "\u00F4", "\u00F6", "\u00F5", "\u0153", "\u00F8", + "\u014D", "\u00BA") // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java index ec08a5a04..d255a0fa9 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKazakh.java @@ -45,21 +45,21 @@ public final class TestsKazakh extends LayoutTestsBase { // U+0443: "у" CYRILLIC SMALL LETTER U // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U // U+04B1: "ұ" CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE - .setMoreKeysOf("\u0443", "3", "\u04AF", "\u04B1") + .setMoreKeysOf("\u0443", "\u04AF", "\u04B1") // U+043A: "к" CYRILLIC SMALL LETTER KA // U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER - .setMoreKeysOf("\u043A", "4", "\u049B") + .setMoreKeysOf("\u043A", "\u049B") // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0451: "ё" CYRILLIC SMALL LETTER IO - .setMoreKeysOf("\u0435", "5", "\u0451") + .setMoreKeysOf("\u0435", "\u0451") // U+043D: "н" CYRILLIC SMALL LETTER EN // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER - .setMoreKeysOf("\u043D", "6", "\u04A3") + .setMoreKeysOf("\u043D", "\u04A3") // U+0433: "г" CYRILLIC SMALL LETTER GHE // U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE - .setMoreKeysOf("\u0433", "7", "\u0493") + .setMoreKeysOf("\u0433", "\u0493") // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9"))) + .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9"))) // U+044B: "ы" CYRILLIC SMALL LETTER YERU // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I .replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B", moreKey("\u0456"))) @@ -73,7 +73,7 @@ public final class TestsKazakh extends LayoutTestsBase { // U+04BB: "һ" CYRILLIC SMALL LETTER SHHA .replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D", moreKey("\u04BB"))) // U+0438: "и" CYRILLIC SMALL LETTER I - .replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438")) + .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438") // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN .setMoreKeysOf("\u044C", "\u044A"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java index ccacf3f06..9797b4ba9 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsKyrgyz.java @@ -44,24 +44,24 @@ public final class TestsKyrgyz extends LayoutTestsBase { return builder // U+0443: "у" CYRILLIC SMALL LETTER U // U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U - .setMoreKeysOf("\u0443", "3", "\u04AF") + .setMoreKeysOf("\u0443", "\u04AF") // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0451: "ё" CYRILLIC SMALL LETTER IO - .setMoreKeysOf("\u0435", "5", "\u0451") + .setMoreKeysOf("\u0435", "\u0451") // U+043D: "н" CYRILLIC SMALL LETTER EN // U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER - .setMoreKeysOf("\u043D", "6", "\u04A3") + .setMoreKeysOf("\u043D", "\u04A3") // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9"))) + .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9"))) // U+044B: "ы" CYRILLIC SMALL LETTER YERU - .replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B")) + .replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B") // U+043E: "о" CYRILLIC SMALL LETTER O // U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O .setMoreKeysOf("\u043E", "\u04E9") // U+044D: "э" CYRILLIC SMALL LETTER E - .replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D")) + .replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D") // U+0438: "и" CYRILLIC SMALL LETTER I - .replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438")) + .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438") // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN .setMoreKeysOf("\u044C", "\u044A"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java index 0f0785440..dc1736c6d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLatvian.java @@ -59,18 +59,18 @@ public final class TestsLatvian extends LayoutTestsBase { // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK // U+011B: "ě" LATIN SMALL LETTER E WITH CARON .setMoreKeysOf("e", - "3", "\u0113", "\u0117", "\u00E8", "\u00E9", "\u00EA", "\u00EB", - "\u0119", "\u011B") + "\u0113", "\u0117", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0119", + "\u011B") // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA // U+0159: "ř" LATIN SMALL LETTER R WITH CARON // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - .setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155") + .setMoreKeysOf("r", "\u0157", "\u0159", "\u0155") // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - .setMoreKeysOf("t", "5", "\u0163", "\u0165") + .setMoreKeysOf("t", "\u0163", "\u0165") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE @@ -80,8 +80,8 @@ public final class TestsLatvian extends LayoutTestsBase { // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE .setMoreKeysOf("u", - "7", "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u00FC", - "\u016F", "\u0171") + "\u016B", "\u0173", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u016F", + "\u0171") // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -90,8 +90,7 @@ public final class TestsLatvian extends LayoutTestsBase { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I .setMoreKeysOf("i", - "8", "\u012B", "\u012F", "\u00EC", "\u00ED", "\u00EE", "\u00EF", - "\u0131") + "\u012B", "\u012F", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0131") // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -101,8 +100,8 @@ public final class TestsLatvian extends LayoutTestsBase { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE .setMoreKeysOf("o", - "9", "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u0153", - "\u0151", "\u00F8") + "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u0153", "\u0151", + "\u00F8") // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java index 9094db91a..55ac37a37 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsLithuanian.java @@ -59,18 +59,18 @@ public final class TestsLithuanian extends LayoutTestsBase { // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+011B: "ě" LATIN SMALL LETTER E WITH CARON .setMoreKeysOf("e", - "3", "\u0117", "\u0119", "\u0113", "\u00E8", "\u00E9", "\u00EA", - "\u00EB", "\u011B") + "\u0117", "\u0119", "\u0113", "\u00E8", "\u00E9", "\u00EA", "\u00EB", + "\u011B") // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA // U+0159: "ř" LATIN SMALL LETTER R WITH CARON // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - .setMoreKeysOf("r", "4", "\u0157", "\u0159", "\u0155") + .setMoreKeysOf("r", "\u0157", "\u0159", "\u0155") // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - .setMoreKeysOf("t", "5", "\u0163", "\u0165") + .setMoreKeysOf("t", "\u0163", "\u0165") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -81,8 +81,8 @@ public final class TestsLithuanian extends LayoutTestsBase { // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE .setMoreKeysOf("u", - "7", "\u016B", "\u0173", "\u00FC", "\u016B", "\u00F9", "\u00FA", - "\u00FB", "\u016F", "\u0171") + "\u016B", "\u0173", "\u00FC", "\u016B", "\u00F9", "\u00FA", "\u00FB", + "\u016F", "\u0171") // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -91,8 +91,7 @@ public final class TestsLithuanian extends LayoutTestsBase { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I .setMoreKeysOf("i", - "8", "\u012F", "\u012B", "\u00EC", "\u00ED", "\u00EE", "\u00EF", - "\u0131") + "\u012F", "\u012B", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0131") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -102,8 +101,8 @@ public final class TestsLithuanian extends LayoutTestsBase { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE .setMoreKeysOf("o", - "9", "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", - "\u0151", "\u00F8") + "\u00F6", "\u00F5", "\u00F2", "\u00F3", "\u00F4", "\u0153", "\u0151", + "\u00F8") // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java index 520269830..1d7d85650 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMacedonian.java @@ -52,18 +52,18 @@ public final class TestsMacedonian extends LayoutTestsBase { return builder // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - .setMoreKeysOf("\u0435", "3", "\u0450") + .setMoreKeysOf("\u0435", "\u0450") // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - .replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0455", moreKey("6"))) + .replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0455", additionalMoreKey("6"))) // U+0438: "и" CYRILLIC SMALL LETTER I // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - .setMoreKeysOf("\u0438", "8", "\u045D") + .setMoreKeysOf("\u0438", "\u045D") // U+045C: "ќ" CYRILLIC SMALL LETTER KJE - .replaceKeyOfLabel(SouthSlavic.ROW2_11, key("\u045C")) + .replaceKeyOfLabel(SouthSlavic.ROW2_11, "\u045C") // U+0437: "з" CYRILLIC SMALL LETTER ZE - .replaceKeyOfLabel(SouthSlavic.ROW3_1, key("\u0437")) + .replaceKeyOfLabel(SouthSlavic.ROW3_1, "\u0437") // U+0453: "ѓ" CYRILLIC SMALL LETTER GJE - .replaceKeyOfLabel(SouthSlavic.ROW3_8, key("\u0453")); + .replaceKeyOfLabel(SouthSlavic.ROW3_8, "\u0453"); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java index 76a3d4df4..3ed63153a 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguage.java @@ -19,14 +19,12 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; /** - * zz: QWERTY/qwerty + * zz: Alphabet/qwerty */ @SmallTest public final class TestsNoLanguage extends LayoutTestsBase { @@ -35,141 +33,4 @@ public final class TestsNoLanguage extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - - private static class NoLanguageCustomizer extends LayoutCustomizer { - public NoLanguageCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX - .setMoreKeysOf("w", "2", "\u0175") - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+0115: "ĕ" LATIN SMALL LETTER E WITH BREVE - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+011B: "ě" LATIN SMALL LETTER E WITH CARON - .setMoreKeysOf("e", - "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113", "\u0115", - "\u0117", "\u0119", "\u011B") - // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE - // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - .setMoreKeysOf("r", "4", "\u0155", "\u0157", "\u0159") - // U+00FE: "þ" LATIN SMALL LETTER THORN - // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - // U+0165: "ť" LATIN SMALL LETTER T WITH CARON - // U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE - .setMoreKeysOf("t", "5", "\u00FE", "\u0163", "\u0165", "\u0167") - // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE - // U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX - // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("y", "6", "\u00FD", "\u0177", "\u00FF", "\u0133") - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+0169: "ũ" LATIN SMALL LETTER U WITH TILDE - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - // U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE - // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE - // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE - // U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK - .setMoreKeysOf("u", - "7", "\u00F9", "\u00FA", "\u00FB", "\u00FC", "\u0169", "\u016B", - "\u016D", "\u016F", "\u0171", "\u0173") - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - // U+012D: "ĭ" LATIN SMALL LETTER I WITH BREVE - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+0131: "ı" LATIN SMALL LETTER DOTLESS I - // U+0133: "ij" LATIN SMALL LIGATURE IJ - .setMoreKeysOf("i", - "8", "\u00EC", "\u00ED", "\u00EE", "\u00EF", "\u0129", "\u012B", - "\u012D", "\u012F", "\u0131", "\u0133") - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+014F: "ŏ" LATIN SMALL LETTER O WITH BREVE - // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "9", "\u00F2", "\u00F3", "\u00F4", "\u00F5", "\u00F6", "\u00F8", - "\u014D", "\u014F", "\u0151", "\u0153", "\u00BA") - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE - // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E0", "\u00E1", "\u00E2", "\u00E3", "\u00E4", "\u00E5", "\u00E6", - "\u0101", "\u0103", "\u0105", "\u00AA") - // U+00DF: "ß" LATIN SMALL LETTER SHARP S - // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - // U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX - // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA - // U+0161: "š" LATIN SMALL LETTER S WITH CARON - // U+017F: "ſ" LATIN SMALL LETTER LONG S - .setMoreKeysOf("s", "\u00DF", "\u015B", "\u015D", "\u015F", "\u0161", "\u017F") - // U+010F: "ď" LATIN SMALL LETTER D WITH CARON - // U+0111: "đ" LATIN SMALL LETTER D WITH STROKE - // U+00F0: "ð" LATIN SMALL LETTER ETH - .setMoreKeysOf("d", "\u010F", "\u0111", "\u00F0") - // U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX - // U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE - // U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE - // U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA - .setMoreKeysOf("g", "\u011D", "\u011F", "\u0121", "\u0123") - // U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX - .setMoreKeysOf("h", "\u0125") - // U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX - .setMoreKeysOf("j", "\u0135") - // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA - // U+0138: "ĸ" LATIN SMALL LETTER KRA - .setMoreKeysOf("k", "\u0137", "\u0138") - // U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE - // U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA - // U+013E: "ľ" LATIN SMALL LETTER L WITH CARON - // U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT - // U+0142: "ł" LATIN SMALL LETTER L WITH STROKE - .setMoreKeysOf("l", "\u013A", "\u013C", "\u013E", "\u0140", "\u0142") - // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE - // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON - .setMoreKeysOf("z", "\u017A", "\u017C", "\u017E") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX - // U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u0109", "\u010B", "\u010D") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - // U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA - // U+0148: "ň" LATIN SMALL LETTER N WITH CARON - // U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE - // U+014B: "ŋ" LATIN SMALL LETTER ENG - .setMoreKeysOf("n", "\u00F1", "\u0144", "\u0146", "\u0148", "\u0149", "\u014B"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java new file mode 100644 index 000000000..8d627e3b4 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageColemak.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.Colemak; +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * zz: Alphabet/colemak + */ +@SmallTest +public final class TestsNoLanguageColemak extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("zz"); + private static final LayoutBase LAYOUT = new Colemak(new NoLanguageColemakCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class NoLanguageColemakCustomizer extends LayoutCustomizer { + private final NoLanguageCustomizer mNoLanguageCustomizer; + + public NoLanguageColemakCustomizer(final Locale locale) { + super(locale); + mNoLanguageCustomizer = new NoLanguageCustomizer(locale); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mNoLanguageCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java new file mode 100644 index 000000000..9bf47ed42 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNoLanguageDvorak.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.Dvorak; +import com.android.inputmethod.keyboard.layout.Dvorak.DvorakCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; + +import java.util.Locale; + +/** + * zz: Alphabet/dvorak + */ +@SmallTest +public final class TestsNoLanguageDvorak extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("zz"); + private static final LayoutBase LAYOUT = new Dvorak(new NoLanguageDvorakCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } + + private static class NoLanguageDvorakCustomizer extends DvorakCustomizer { + private final NoLanguageCustomizer mNoLanguageCustomizer; + + public NoLanguageDvorakCustomizer(final Locale locale) { + super(locale); + mNoLanguageCustomizer = new NoLanguageCustomizer(locale); + } + + @Override + public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { + return mNoLanguageCustomizer.setAccentedLetters(builder); + } + } +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java index d5b904c5f..5d220dfa1 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsNorwegian.java @@ -58,14 +58,13 @@ public final class TestsNorwegian extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", - "\u0113") + "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119", "\u0117", "\u0113") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") + .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE @@ -74,10 +73,9 @@ public final class TestsNorwegian extends LayoutTestsBase { // U+0153: "œ" LATIN SMALL LIGATURE OE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153", - "\u014D") + "\u00F4", "\u00F2", "\u00F3", "\u00F6", "\u00F5", "\u0153", "\u014D") // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - .replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5")) + .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5") // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F8", moreKey("\u00F6"))) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java index 7d8f62963..04f88c3fc 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPolish.java @@ -58,8 +58,7 @@ public final class TestsPolish extends LayoutTestsBase { // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON .setMoreKeysOf("e", - "3", "\u0119", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0117", - "\u0113") + "\u0119", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0117", "\u0113") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -69,8 +68,8 @@ public final class TestsPolish extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", - "\u00F8", "\u014D") + "\u00F3", "\u00F6", "\u00F4", "\u00F2", "\u00F5", "\u0153", "\u00F8", + "\u014D") // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java index 00ee6981f..8a984a765 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortugueseBR.java @@ -19,9 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -31,69 +29,8 @@ import java.util.Locale; @SmallTest public class TestsPortugueseBR extends LayoutTestsBase { private static final Locale LOCALE = new Locale("pt", "BR"); - private static final LayoutBase LAYOUT = new Qwerty(new PortugueseBRCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwerty(new PortugueseCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - // TODO: Make this as generic Portuguese customizer. - static class PortugueseBRCustomizer extends LayoutCustomizer { - public PortugueseBRCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - .setMoreKeysOf("e", - "3", "\u00E9", "\u00EA", "\u00E8", "\u0119", "\u0117", "\u0113", - "\u00EB") - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00ED", "\u00EE", "\u00EC", "\u00EF", "\u012F", - "\u012B") - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "9", "\u00F3", "\u00F5", "\u00F4", "\u00F2", "\u00F6", "\u0153", - "\u00F8", "\u014D", "\u00BA") - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E1", "\u00E3", "\u00E0", "\u00E2", "\u00E4", "\u00E5", "\u00E6", - "\u00AA") - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - .setMoreKeysOf("c", "\u00E7", "\u010D", "\u0107"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java index 836542ea9..e15e811db 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsPortuguesePT.java @@ -19,9 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; import java.util.Locale; @@ -36,17 +36,20 @@ public final class TestsPortuguesePT extends TestsPortugueseBR { @Override LayoutBase getLayout() { return LAYOUT; } - private static class PortuguesePTCustomizer extends EuroLayoutCustomizer { - private final PortugueseBRCustomizer mPortugueseCustomizer; + private static class PortuguesePTCustomizer extends PortugueseCustomizer { + private final EuroCustomizer mEuroCustomizer; public PortuguesePTCustomizer(final Locale locale) { super(locale); - mPortugueseCustomizer = new PortugueseBRCustomizer(locale); + mEuroCustomizer = new EuroCustomizer(locale); } @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return mPortugueseCustomizer.setAccentedLetters(builder); + public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); } + + @Override + public ExpectedKey[] getOtherCurrencyKeys() { + return mEuroCustomizer.getOtherCurrencyKeys(); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java index 59b328d07..0207f1c22 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRomanian.java @@ -51,15 +51,14 @@ public final class TestsRomanian extends LayoutTestsBase { public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { return builder // U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW - .setMoreKeysOf("t", "5", "\u021B") + .setMoreKeysOf("t", "\u021B") // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", - "\u012B") + .setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B") // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java index 14f950160..9919207ed 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsRussian.java @@ -52,15 +52,15 @@ public final class TestsRussian extends LayoutTestsBase { return builder // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0451: "ё" CYRILLIC SMALL LETTER IO - .setMoreKeysOf("\u0435", "5", "\u0451") + .setMoreKeysOf("\u0435", "\u0451") // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9"))) + .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9"))) // U+044B: "ы" CYRILLIC SMALL LETTER YERU - .replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u044B")) + .replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B") // U+044D: "э" CYRILLIC SMALL LETTER E - .replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u044D")) + .replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D") // U+0438: "и" CYRILLIC SMALL LETTER I - .replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438")) + .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438") // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN .setMoreKeysOf("\u044C", "\u044A"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java index 119ea142c..41f1690f3 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbian.java @@ -58,18 +58,18 @@ public final class TestsSerbian extends LayoutTestsBase { return builder // U+0435: "е" CYRILLIC SMALL LETTER IE // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE - .setMoreKeysOf("\u0435", "3", "\u0450") + .setMoreKeysOf("\u0435", "\u0450") // U+0437: "з" CYRILLIC SMALL LETTER ZE - .replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0437", moreKey("6"))) + .replaceKeyOfLabel(SouthSlavic.ROW1_6, key("\u0437", additionalMoreKey("6"))) // U+0438: "и" CYRILLIC SMALL LETTER I // U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE - .setMoreKeysOf("\u0438", "8", "\u045D") + .setMoreKeysOf("\u0438", "\u045D") // U+045B: "ћ" CYRILLIC SMALL LETTER TSHE - .replaceKeyOfLabel(SouthSlavic.ROW2_11, key("\u045B")) + .replaceKeyOfLabel(SouthSlavic.ROW2_11, "\u045B") // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE - .replaceKeyOfLabel(SouthSlavic.ROW3_1, key("\u0455")) + .replaceKeyOfLabel(SouthSlavic.ROW3_1, "\u0455") // U+0452: "ђ" CYRILLIC SMALL LETTER DJE - .replaceKeyOfLabel(SouthSlavic.ROW3_8, key("\u0452")); + .replaceKeyOfLabel(SouthSlavic.ROW3_8, "\u0452"); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java index 3d7825b13..bdaf0cad1 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovak.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsSlovak extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class SlovakCustomizer extends EuroLayoutCustomizer { + private static class SlovakCustomizer extends EuroCustomizer { public SlovakCustomizer(final Locale locale) { super(locale); } @Override @@ -65,18 +65,18 @@ public final class TestsSlovak extends LayoutTestsBase { // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK .setMoreKeysOf("e", - "3", "\u00E9", "\u011B", "\u0113", "\u0117", "\u00E8", "\u00EA", - "\u00EB", "\u0119") + "\u00E9", "\u011B", "\u0113", "\u0117", "\u00E8", "\u00EA", "\u00EB", + "\u0119") // U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE // U+0159: "ř" LATIN SMALL LETTER R WITH CARON // U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA - .setMoreKeysOf("r", "4", "\u0155", "\u0159", "\u0157") + .setMoreKeysOf("r", "\u0155", "\u0159", "\u0157") // U+0165: "ť" LATIN SMALL LETTER T WITH CARON // U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA - .setMoreKeysOf("t", "5", "\u0165", "\u0163") + .setMoreKeysOf("t", "\u0165", "\u0163") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -86,8 +86,8 @@ public final class TestsSlovak extends LayoutTestsBase { // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE .setMoreKeysOf("u", - "7", "\u00FA", "\u016F", "\u00FC", "\u016B", "\u0173", "\u00F9", - "\u00FB", "\u0171") + "\u00FA", "\u016F", "\u00FC", "\u016B", "\u0173", "\u00F9", "\u00FB", + "\u0171") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK @@ -96,8 +96,7 @@ public final class TestsSlovak extends LayoutTestsBase { // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+0131: "ı" LATIN SMALL LETTER DOTLESS I .setMoreKeysOf("i", - "8", "\u00ED", "\u012B", "\u012F", "\u00EC", "\u00EE", "\u00EF", - "\u0131") + "\u00ED", "\u012B", "\u012F", "\u00EC", "\u00EE", "\u00EF", "\u0131") // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -107,8 +106,8 @@ public final class TestsSlovak extends LayoutTestsBase { // U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE .setMoreKeysOf("o", - "9", "\u00F4", "\u00F3", "\u00F6", "\u00F2", "\u00F5", "\u0153", - "\u0151", "\u00F8") + "\u00F4", "\u00F3", "\u00F6", "\u00F2", "\u00F5", "\u0153", "\u0151", + "\u00F8") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java index 88a23ba07..cdb1beeba 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSlovenian.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsSlovenian extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class SlovenianCustomizer extends EuroLayoutCustomizer { + private static class SlovenianCustomizer extends EuroCustomizer { public SlovenianCustomizer(final Locale locale) { super(locale); } @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java index cc5a64c69..12e8676ae 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish.java @@ -19,11 +19,9 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Spanish; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; -import com.android.inputmethod.keyboard.layout.tests.TestsSpanishUS.SpanishUSCustomizer; import java.util.Locale; @@ -38,22 +36,20 @@ public class TestsSpanish extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class SpanishESCustomizer extends EuroLayoutCustomizer { - private final SpanishUSCustomizer mSpanishUSCustomizer; + private static class SpanishESCustomizer extends SpanishCustomizer { + private final EuroCustomizer mEuroCustomizer; public SpanishESCustomizer(final Locale locale) { super(locale); - mSpanishUSCustomizer = new SpanishUSCustomizer(locale); + mEuroCustomizer = new EuroCustomizer(locale); } @Override - public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) { - return mSpanishUSCustomizer.getPunctuationMoreKeys(isPhone); - } + public ExpectedKey getCurrencyKey() { return mEuroCustomizer.getCurrencyKey(); } @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return mSpanishUSCustomizer.setAccentedLetters(builder); + public ExpectedKey[] getOtherCurrencyKeys() { + return mEuroCustomizer.getOtherCurrencyKeys(); } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java index 517db9d9f..c3ac0a0c0 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanishUS.java @@ -19,10 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Spanish; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; import java.util.Locale; @@ -32,89 +29,8 @@ import java.util.Locale; @SmallTest public class TestsSpanishUS extends TestsSpanish { private static final Locale LOCALE = new Locale("es", "US"); - private static final LayoutBase LAYOUT = new Spanish(new SpanishUSCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Spanish(new SpanishCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } - - // Make this as generic Spanish customizer. - static class SpanishUSCustomizer extends LayoutCustomizer { - public SpanishUSCustomizer(final Locale locale) { super(locale); } - - @Override - public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) { - return isPhone ? PHONE_PUNCTUATION_MORE_KEYS - : LayoutBase.TABLET_PUNCTUATION_MORE_KEYS; - } - - // Punctuation more keys for phone form factor. - private static final ExpectedKey[] PHONE_PUNCTUATION_MORE_KEYS = joinKeys( - // U+00A1: "¡" INVERTED EXCLAMATION MARK - // U+00BF: "¿" INVERTED QUESTION MARK - "\u00A1", ";", "/", "(", ")", "#", "!", ",", "?", - "\u00BF", "&", "%", "+", "\"", "-", ":", "'", "@"); - - @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return builder - // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE - // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS - // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX - // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - // U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE - // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", - "3", "\u00E9", "\u00E8", "\u00EB", "\u00EA", "\u0119", "\u0117", - "\u0113") - // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX - // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FA", "\u00FC", "\u00F9", "\u00FB", "\u016B") - // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE - // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX - // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK - // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", "\u00ED", "\u00EF", "\u00EC", "\u00EE", "\u012F", - "\u012B") - // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE - // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS - // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX - // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE - // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE - // U+0153: "œ" LATIN SMALL LIGATURE OE - // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - // U+00BA: "º" MASCULINE ORDINAL INDICATOR - .setMoreKeysOf("o", - "9", "\u00F3", "\u00F2", "\u00F6", "\u00F4", "\u00F5", "\u00F8", - "\u0153", "\u014D", "\u00BA") - // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE - // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE - // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS - // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX - // U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE - // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK - // U+00E6: "æ" LATIN SMALL LETTER AE - // U+0101: "ā" LATIN SMALL LETTER A WITH MACRON - // U+00AA: "ª" FEMININE ORDINAL INDICATOR - .setMoreKeysOf("a", - "\u00E1", "\u00E0", "\u00E4", "\u00E2", "\u00E3", "\u00E5", "\u0105", - "\u00E6", "\u0101", "\u00AA") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - .replaceKeyOfLabel(Spanish.ROW2_10, key("\u00F1")) - // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA - // U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - // U+010D: "č" LATIN SMALL LETTER C WITH CARON - .setMoreKeysOf("c", "\u00E7", "\u0107", "\u010D") - // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - // U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE - .setMoreKeysOf("n", "\u00F1", "\u0144"); - } - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java index 49e1912ee..13b974194 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwahili.java @@ -47,19 +47,19 @@ public final class TestsSwahili extends LayoutTestsBase { // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+0113: "ē" LATIN SMALL LETTER E WITH MACRON - .setMoreKeysOf("e", "3", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113") + .setMoreKeysOf("e", "\u00E8", "\u00E9", "\u00EA", "\u00EB", "\u0113") // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B") + .setMoreKeysOf("u", "\u00FB", "\u00FC", "\u00F9", "\u00FA", "\u016B") // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE - .setMoreKeysOf("i", "8", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC") + .setMoreKeysOf("i", "\u00EE", "\u00EF", "\u00ED", "\u012B", "\u00EC") // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -69,8 +69,8 @@ public final class TestsSwahili extends LayoutTestsBase { // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE .setMoreKeysOf("o", - "9", "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", - "\u014D", "\u00F5") + "\u00F4", "\u00F6", "\u00F2", "\u00F3", "\u0153", "\u00F8", "\u014D", + "\u00F5") // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java index 14155cb0e..9b58914a2 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSwedish.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Nordic; import com.android.inputmethod.keyboard.layout.Symbols; import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; @@ -38,7 +38,7 @@ public final class TestsSwedish extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class SwedishCustomizer extends EuroLayoutCustomizer { + private static class SwedishCustomizer extends EuroCustomizer { public SwedishCustomizer(final Locale locale) { super(locale); } @Override @@ -55,39 +55,39 @@ public final class TestsSwedish extends LayoutTestsBase { // U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX // U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS // U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK - .setMoreKeysOf("e", "3", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119") + .setMoreKeysOf("e", "\u00E9", "\u00E8", "\u00EA", "\u00EB", "\u0119") // U+0159: "ř" LATIN SMALL LETTER R WITH CARON - .setMoreKeysOf("r", "4", "\u0159") + .setMoreKeysOf("r", "\u0159") // U+0165: "ť" LATIN SMALL LETTER T WITH CARON // U+00FE: "þ" LATIN SMALL LETTER THORN - .setMoreKeysOf("t", "5", "\u0165", "\u00FE") + .setMoreKeysOf("t", "\u0165", "\u00FE") // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - .setMoreKeysOf("y", "6", "\u00FD", "\u00FF") + .setMoreKeysOf("y", "\u00FD", "\u00FF") // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B") + .setMoreKeysOf("u", "\u00FC", "\u00FA", "\u00F9", "\u00FB", "\u016B") // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - .setMoreKeysOf("i", "8", "\u00ED", "\u00EC", "\u00EE", "\u00EF") + .setMoreKeysOf("i", "\u00ED", "\u00EC", "\u00EE", "\u00EF") // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON - .setMoreKeysOf("o", "9", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D") + .setMoreKeysOf("o", "\u00F3", "\u00F2", "\u00F4", "\u00F5", "\u014D") // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE - .replaceKeyOfLabel(Nordic.ROW1_11, key("\u00E5")) + .replaceKeyOfLabel(Nordic.ROW1_11, "\u00E5") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+0153: "œ" LATIN SMALL LIGATURE OE - .replaceKeyOfLabel(Nordic.ROW2_10, key("\u00F6", - moreKey("\u00F8"), moreKey("\u0153"))) + .replaceKeyOfLabel(Nordic.ROW2_10, + key("\u00F6", joinMoreKeys("\u00F8", "\u0153"))) // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS // U+00E6: "æ" LATIN SMALL LETTER AE .replaceKeyOfLabel(Nordic.ROW2_11, key("\u00E4", moreKey("\u00E6"))) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java index 72e435a24..38d5364e5 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTagalog.java @@ -19,10 +19,8 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.LayoutCustomizer; import com.android.inputmethod.keyboard.layout.Spanish; -import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; -import com.android.inputmethod.keyboard.layout.tests.TestsSpanishUS.SpanishUSCustomizer; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; import java.util.Locale; @@ -37,17 +35,16 @@ public class TestsTagalog extends TestsSpanish { @Override LayoutBase getLayout() { return LAYOUT; } - private static class TagalogCustomizer extends LayoutCustomizer { - private final SpanishUSCustomizer mSpanishUSCustomizer; + private static class TagalogCustomizer extends SpanishCustomizer { public TagalogCustomizer(final Locale locale) { super(locale); - mSpanishUSCustomizer = new SpanishUSCustomizer(locale); } @Override - public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { - return mSpanishUSCustomizer.setAccentedLetters(builder); + public ExpectedKey[] getPunctuationMoreKeys(final boolean isPhone) { + return isPhone ? LayoutBase.PHONE_PUNCTUATION_MORE_KEYS + : LayoutBase.TABLET_PUNCTUATION_MORE_KEYS; } } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java index ab67ae90d..b35f8850a 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTurkish.java @@ -19,7 +19,7 @@ package com.android.inputmethod.keyboard.layout.tests; import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.keyboard.layout.LayoutBase; -import com.android.inputmethod.keyboard.layout.LayoutBase.EuroLayoutCustomizer; +import com.android.inputmethod.keyboard.layout.LayoutBase.EuroCustomizer; import com.android.inputmethod.keyboard.layout.Qwerty; import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; @@ -36,7 +36,7 @@ public final class TestsTurkish extends LayoutTestsBase { @Override LayoutBase getLayout() { return LAYOUT; } - private static class TurkishCustomizer extends EuroLayoutCustomizer { + private static class TurkishCustomizer extends EuroCustomizer { public TurkishCustomizer(final Locale locale) { super(locale); } @Override @@ -47,7 +47,7 @@ public final class TestsTurkish extends LayoutTestsBase { // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON - .setMoreKeysOf("u", "7", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") + .setMoreKeysOf("u", "\u00FC", "\u00FB", "\u00F9", "\u00FA", "\u016B") // U+0131: "ı" LATIN SMALL LETTER DOTLESS I // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX // U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -55,7 +55,7 @@ public final class TestsTurkish extends LayoutTestsBase { // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+012F: "į" LATIN SMALL LETTER I WITH OGONEK // U+012B: "ī" LATIN SMALL LETTER I WITH MACRON - .setMoreKeysOf("i", "8", + .setMoreKeysOf("i", "\u0131", "\u00EE", "\u00EF", "\u00EC", "\u00ED", "\u012F", "\u012B") // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -66,8 +66,8 @@ public final class TestsTurkish extends LayoutTestsBase { // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+014D: "ō" LATIN SMALL LETTER O WITH MACRON .setMoreKeysOf("o", - "9", "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", - "\u00F8", "\u014D") + "\u00F6", "\u00F4", "\u0153", "\u00F2", "\u00F3", "\u00F5", "\u00F8", + "\u014D") // U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX .setMoreKeysOf("a", "\u00E2") // U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java index 27893fe9b..a6bcacc9e 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUkrainian.java @@ -65,16 +65,16 @@ public final class TestsUkrainian extends LayoutTestsBase { return builder // U+0433: "г" CYRILLIC SMALL LETTER GHE // U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN - .setMoreKeysOf("\u0433", "7", "\u0491") + .setMoreKeysOf("\u0433", "\u0491") // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA - .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", moreKey("9"))) + .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u0449", additionalMoreKey("9"))) // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I // U+0457: "ї" CYRILLIC SMALL LETTER YI .replaceKeyOfLabel(EastSlavic.ROW2_2, key("\u0456", moreKey("\u0457"))) // U+0454: "є" CYRILLIC SMALL LETTER UKRAINIAN IE - .replaceKeyOfLabel(EastSlavic.ROW2_11, key("\u0454")) + .replaceKeyOfLabel(EastSlavic.ROW2_11, "\u0454") // U+0438: "и" CYRILLIC SMALL LETTER I - .replaceKeyOfLabel(EastSlavic.ROW3_5, key("\u0438")) + .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0438") // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN .setMoreKeysOf("\u044C", "\u044A"); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java index 96ae38a9c..83d86ac4d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsVietnamese.java @@ -71,14 +71,14 @@ public final class TestsVietnamese extends LayoutTestsBase { // U+1EC5: "ễ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE // U+1EC7: "ệ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW .setMoreKeysOf("e", - "3", "\u00E8", "\u00E9", "\u1EBB", "\u1EBD", "\u1EB9", "\u00EA", - "\u1EC1", "\u1EBF", "\u1EC3", "\u1EC5", "\u1EC7") + "\u00E8", "\u00E9", "\u1EBB", "\u1EBD", "\u1EB9", "\u00EA", "\u1EC1", + "\u1EBF", "\u1EC3", "\u1EC5", "\u1EC7") // 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 // U+1EF9: "ỹ" LATIN SMALL LETTER Y WITH TILDE // U+1EF5: "ỵ" LATIN SMALL LETTER Y WITH DOT BELOW - .setMoreKeysOf("y", "6", "\u1EF3", "\u00FD", "\u1EF7", "\u1EF9", "\u1EF5") + .setMoreKeysOf("y", "\u1EF3", "\u00FD", "\u1EF7", "\u1EF9", "\u1EF5") // U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE // U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE // U+1EE7: "ủ" LATIN SMALL LETTER U WITH HOOK ABOVE @@ -91,14 +91,14 @@ public final class TestsVietnamese extends LayoutTestsBase { // U+1EEF: "ữ" LATIN SMALL LETTER U WITH HORN AND TILDE // U+1EF1: "ự" LATIN SMALL LETTER U WITH HORN AND DOT BELOW .setMoreKeysOf("u", - "7", "\u00F9", "\u00FA", "\u1EE7", "\u0169", "\u1EE5", "\u01B0", - "\u1EEB", "\u1EE9", "\u1EED", "\u1EEF", "\u1EF1") + "\u00F9", "\u00FA", "\u1EE7", "\u0169", "\u1EE5", "\u01B0", "\u1EEB", + "\u1EE9", "\u1EED", "\u1EEF", "\u1EF1") // U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE // U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE // U+1EC9: "ỉ" LATIN SMALL LETTER I WITH HOOK ABOVE // U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE // U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW - .setMoreKeysOf("i", "8", "\u00EC", "\u00ED", "\u1EC9", "\u0129", "\u1ECB") + .setMoreKeysOf("i", "\u00EC", "\u00ED", "\u1EC9", "\u0129", "\u1ECB") // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+1ECF: "ỏ" LATIN SMALL LETTER O WITH HOOK ABOVE @@ -117,9 +117,9 @@ public final class TestsVietnamese extends LayoutTestsBase { // U+1EE1: "ỡ" LATIN SMALL LETTER O WITH HORN AND TILDE // U+1EE3: "ợ" LATIN SMALL LETTER O WITH HORN AND DOT BELOW .setMoreKeysOf("o", - "9", "\u00F2", "\u00F3", "\u1ECF", "\u00F5", "\u1ECD", "\u00F4", - "\u1ED3", "\u1ED1", "\u1ED5", "\u1ED7", "\u1ED9", "\u01A1", "\u1EDD", - "\u1EDB", "\u1EDF", "\u1EE1", "\u1EE3") + "\u00F2", "\u00F3", "\u1ECF", "\u00F5", "\u1ECD", "\u00F4", "\u1ED3", + "\u1ED1", "\u1ED5", "\u1ED7", "\u1ED9", "\u01A1", "\u1EDD", "\u1EDB", + "\u1EDF", "\u1EE1", "\u1EE3") // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE // U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE // U+1EA3: "ả" LATIN SMALL LETTER A WITH HOOK ABOVE diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java index 04e89be55..e048e92c2 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsZulu.java @@ -29,7 +29,7 @@ import java.util.Locale; @SmallTest public final class TestsZulu extends TestsEnglishUS { private static final Locale LOCALE = new Locale("zu"); - private static final LayoutBase LAYOUT = new Qwerty(new EnglishUSCustomizer(LOCALE)); + private static final LayoutBase LAYOUT = new Qwerty(new EnglishCustomizer(LOCALE)); @Override LayoutBase getLayout() { return LAYOUT; } diff --git a/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml new file mode 100644 index 000000000..83dbe0e85 --- /dev/null +++ b/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ +<?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"> + <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + U+00E6: "æ" LATIN SMALL LETTER AE + U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + U+00AA: "ª" FEMININE ORDINAL INDICATOR --> + <string name="more_keys_for_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> + <string name="more_keys_for_e">é,è,ë,ê,ę,ė,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> + <string name="more_keys_for_i">í,ï,ì,î,į,ī</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + U+0153: "œ" LATIN SMALL LIGATURE OE + U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + U+00BA: "º" MASCULINE ORDINAL INDICATOR --> + <string name="more_keys_for_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> + <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> + <string name="more_keys_for_n">ñ,ń</string> + <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + U+010D: "č" LATIN SMALL LETTER C WITH CARON --> + <string name="more_keys_for_c">ç,ć,č</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml index 665677698..47b1c9ef7 100644 --- a/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml @@ -62,7 +62,7 @@ <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE U+010D: "č" LATIN SMALL LETTER C WITH CARON --> - <string name="more_keys_for_c">ç,ć,č</string> + <string name="more_keys_for_c">ç,%,ć,č</string> <!-- U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> <string name="more_keys_for_y">%,ÿ</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE --> diff --git a/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml new file mode 100644 index 000000000..83dbe0e85 --- /dev/null +++ b/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ +<?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"> + <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + U+00E6: "æ" LATIN SMALL LETTER AE + U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + U+00AA: "ª" FEMININE ORDINAL INDICATOR --> + <string name="more_keys_for_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> + <string name="more_keys_for_e">é,è,ë,ê,ę,ė,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> + <string name="more_keys_for_i">í,ï,ì,î,į,ī</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + U+0153: "œ" LATIN SMALL LIGATURE OE + U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + U+00BA: "º" MASCULINE ORDINAL INDICATOR --> + <string name="more_keys_for_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> + <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> + <string name="more_keys_for_n">ñ,ń</string> + <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE + U+010D: "č" LATIN SMALL LETTER C WITH CARON --> + <string name="more_keys_for_c">ç,ć,č</string> +</resources> |