diff --git a/java/res/xml-sw600dp/rows_malayalam.xml b/java/res/xml-sw600dp/rows_malayalam.xml new file mode 100644 index 0000000000000000000000000000000000000000..1df7e6ea6691e871d526f50399ade63ba48f620d --- /dev/null +++ b/java/res/xml-sw600dp/rows_malayalam.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <include latin:keyboardLayout="@xml/key_styles_common" /> + <Row + latin:keyWidth="8.182%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam1" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" /> + </Row> + <Row + latin:keyWidth="8.182%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam2" /> + <Key + latin:keyStyle="enterKeyStyle" + latin:keyWidth="fillRight" /> + </Row> + <Row + latin:keyWidth="8.182%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam3" /> + <include latin:keyboardLayout="@xml/keys_exclamation_question" /> + </Row> + <include latin:keyboardLayout="@xml/row_qwerty4" /> +</merge> diff --git a/java/res/xml/kbd_malayalam.xml b/java/res/xml/kbd_malayalam.xml new file mode 100644 index 0000000000000000000000000000000000000000..000b23f820afd231aaeeb33b209b17808e4fc101 --- /dev/null +++ b/java/res/xml/kbd_malayalam.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<Keyboard + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <include + latin:keyboardLayout="@xml/rows_malayalam" /> +</Keyboard> diff --git a/java/res/xml/keyboard_layout_set_malayalam.xml b/java/res/xml/keyboard_layout_set_malayalam.xml new file mode 100644 index 0000000000000000000000000000000000000000..14c76baf0df5785ae38e6f6662894e153fdcb80d --- /dev/null +++ b/java/res/xml/keyboard_layout_set_malayalam.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<KeyboardLayoutSet + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <Element + latin:elementName="alphabet" + latin:elementKeyboard="@xml/kbd_malayalam" + latin:enableProximityCharsCorrection="true" /> + <Element + latin:elementName="symbols" + latin:elementKeyboard="@xml/kbd_symbols" /> + <Element + latin:elementName="symbolsShifted" + latin:elementKeyboard="@xml/kbd_symbols_shift" /> + <Element + latin:elementName="phone" + latin:elementKeyboard="@xml/kbd_phone" /> + <Element + latin:elementName="phoneSymbols" + latin:elementKeyboard="@xml/kbd_phone_symbols" /> + <Element + latin:elementName="number" + latin:elementKeyboard="@xml/kbd_number" /> +</KeyboardLayoutSet> diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 7a6640bcc5a06d6fab56ccfc515ef83f75b83dd2..6d4d3f26b2d1d3130e4fca29f4399037463f46b9 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -68,6 +68,7 @@ lt: Lithuanian/qwerty lv: Latvian/qwerty mk: Macedonian/south_slavic + (ml_IN: Malayalam (India)/malayalam) # This is a preliminary keyboard layout. mn_MN: Mongolian (Mongolia)/mongolian (mr_IN: Marathi (India)/marathi) # This is a preliminary keyboard layout. ms_MY: Malay (Malaysia)/qwerty @@ -483,6 +484,16 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=south_slavic,EmojiCapable" android:isAsciiCapable="false" /> + <!-- TODO: This malayalam keyboard is a preliminary layout. + This isn't based on the final specification. --> + <subtype android:icon="@drawable/ic_ime_switcher_dark" + android:label="@string/subtype_generic" + android:subtypeId="0xc182ebd4" + android:imeSubtypeLocale="ml_IN" + android:imeSubtypeMode="keyboard" + android:imeSubtypeExtraValue="KeyboardLayoutSet=malayalam,EmojiCapable" + android:isAsciiCapable="false" + /> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xcdcfc3ab" diff --git a/java/res/xml/rowkeys_malayalam1.xml b/java/res/xml/rowkeys_malayalam1.xml new file mode 100644 index 0000000000000000000000000000000000000000..79d96cbb7bfe43945487ccd7595eb743af04a909 --- /dev/null +++ b/java/res/xml/rowkeys_malayalam1.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" > + <!-- U+0D4D: "àµ" MALAYALAM SIGN VIRAMA + U+0D05: "à´…" MALAYALAM LETTER A --> + <Key + latin:keySpec="്" + latin:moreKeys="അ,%" + latin:keyHintLabel="1" + latin:additionalMoreKeys="1" /> + <!-- U+0D3E: "à´¾" MALAYALAM VOWEL SIGN AA + U+0D06: "à´†" MALAYALAM LETTER AA --> + <Key + latin:keySpec="ാ" + latin:moreKeys="ആ,%" + latin:keyHintLabel="2" + latin:additionalMoreKeys="2" /> + <!-- U+0D3F: "à´¿" MALAYALAM VOWEL SIGN I + U+0D07: "à´‡" MALAYALAM LETTER I --> + <Key + latin:keySpec="ി" + latin:moreKeys="ഇ,%" + latin:keyHintLabel="3" + latin:additionalMoreKeys="3" /> + <!-- U+0D40: "ീ" MALAYALAM VOWEL SIGN II + U+0D08: "à´ˆ" MALAYALAM LETTER II --> + <Key + latin:keySpec="ീ" + latin:moreKeys="ഈ,%" + latin:keyHintLabel="4" + latin:additionalMoreKeys="4" /> + <!-- U+0D41: "àµ" MALAYALAM VOWEL SIGN U + U+0D09: "à´‰" MALAYALAM LETTER U --> + <Key + latin:keySpec="ു" + latin:moreKeys="ഉ,%" + latin:keyHintLabel="5" + latin:additionalMoreKeys="5" /> + <!-- U+0D42: "ൂ" MALAYALAM VOWEL SIGN UU + U+0D0A: "à´Š" MALAYALAM LETTER UU --> + <Key + latin:keySpec="ൂ" + latin:moreKeys="ഊ,%" + latin:keyHintLabel="6" + latin:additionalMoreKeys="6" /> + <!-- U+0D43: "ൃ" MALAYALAM VOWEL SIGN VOCALIC R + U+0D0B: "à´‹" MALAYALAM LETTER VOCALIC R --> + <Key + latin:keySpec="ൃ" + latin:moreKeys="ഋ,%" + latin:keyHintLabel="7" + latin:additionalMoreKeys="7" /> + <!-- U+0D46: "െ" MALAYALAM VOWEL SIGN E + U+0D0E: "à´Ž" MALAYALAM LETTER E + U+0D10: "à´" MALAYALAM LETTER AI + U+0D48: "ൈ" MALAYALAM VOWEL SIGN AI --> + <Key + latin:keySpec="െ" + latin:moreKeys="എ,ഐ,ൈ,%" + latin:keyHintLabel="8" + latin:additionalMoreKeys="8" /> + <!-- U+0D47: "േ" MALAYALAM VOWEL SIGN EE + U+0D0F: "à´" MALAYALAM LETTER EE --> + <Key + latin:keySpec="േ" + latin:moreKeys="ഏ,%" + latin:keyHintLabel="9" + latin:additionalMoreKeys="9" /> + <!-- U+0D4A: "ൊ" MALAYALAM VOWEL SIGN O + U+0D12: "à´’" MALAYALAM LETTER O --> + <Key + latin:keySpec="ൊ" + latin:moreKeys="ഒ,%" + latin:keyHintLabel="0" + latin:additionalMoreKeys="0" /> + <!-- U+0D4B: "ോ" MALAYALAM VOWEL SIGN OO + U+0D13: "à´“" MALAYALAM LETTER OO + U+0D14: "à´”" MALAYALAM LETTER AU + U+0D57: "ൗ" MALAYALAM AU LENGTH MARK --> + <Key latin:keySpec="ോ" + latin:moreKeys="ഓ,ഔ,ൗ" /> +</merge> diff --git a/java/res/xml/rowkeys_malayalam2.xml b/java/res/xml/rowkeys_malayalam2.xml new file mode 100644 index 0000000000000000000000000000000000000000..f0f9df02557c8239797ad939c8244d435e38a7cc --- /dev/null +++ b/java/res/xml/rowkeys_malayalam2.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <!-- U+0D15: "à´•" MALAYALAM LETTER KA + U+0D16: "à´–" MALAYALAM LETTER KHA --> + <Key + latin:keySpec="ക" + latin:moreKeys="ഖ" /> + <!-- U+0D17: "à´—" MALAYALAM LETTER GA + U+0D18: "à´˜" MALAYALAM LETTER GHA --> + <Key + latin:keySpec="ഗ" + latin:moreKeys="ഘ" /> + <!-- U+0D19: "à´™" MALAYALAM LETTER NGA + U+0D1E: "à´ž" MALAYALAM LETTER NYA --> + <Key + latin:keySpec="ങ" + latin:moreKeys="ഞ" /> + <!-- U+0D1A: "à´š" MALAYALAM LETTER CA + U+0D1B: "à´›" MALAYALAM LETTER CHA --> + <Key + latin:keySpec="ച" + latin:moreKeys="ഛ" /> + <!-- U+0D1C: "à´œ" MALAYALAM LETTER JA + U+0D1D: "à´" MALAYALAM LETTER JHA --> + <Key + latin:keySpec="ജ" + latin:moreKeys="ഝ" /> + <!-- U+0D1F: "à´Ÿ" MALAYALAM LETTER TTA + U+0D20: "à´ " MALAYALAM LETTER TTHA --> + <Key + latin:keySpec="ട" + latin:moreKeys="ഠ" /> + <!-- U+0D21: "à´¡" MALAYALAM LETTER DDA + U+0D22: "à´¢" MALAYALAM LETTER DDHA --> + <Key + latin:keySpec="ഡ" + latin:moreKeys="ഢ" /> + <!-- U+0D23: "à´£" MALAYALAM LETTER NNA + U+0D7A: "ൺ" MALAYALAM LETTER CHILLU NN --> + <Key + latin:keySpec="ണ" + latin:moreKeys="ൺ" /> + <!-- U+0D24: "à´¤" MALAYALAM LETTER TA + U+0D25: "à´¥" MALAYALAM LETTER THA --> + <Key + latin:keySpec="ത" + latin:moreKeys="ഥ" /> + <!-- U+0D26: "à´¦" MALAYALAM LETTER DA + U+0D27: "à´§" MALAYALAM LETTER DHA --> + <Key + latin:keySpec="ദ" + latin:moreKeys="ധ" /> + <!-- U+0D28: "à´—à´¨" MALAYALAM LETTER NA + U+0D7B: "ൻ" MALAYALAM LETTER CHILLU N --> + <Key + latin:keySpec="ന" + latin:moreKeys="ൻ" /> +</merge> diff --git a/java/res/xml/rowkeys_malayalam3.xml b/java/res/xml/rowkeys_malayalam3.xml new file mode 100644 index 0000000000000000000000000000000000000000..6959ccda16ae3d6dd922a6a096f5db806dd1cc84 --- /dev/null +++ b/java/res/xml/rowkeys_malayalam3.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <!-- U+0D2A: "à´ª" MALAYALAM LETTER PA + U+0D2B: "à´«" MALAYALAM LETTER PHA --> + <Key + latin:keySpec="പ" + latin:moreKeys="ഫ" /> + <!-- U+0D2C: "à´¬" MALAYALAM LETTER BA + U+0D2D: "à´" MALAYALAM LETTER BHA --> + <Key + latin:keySpec="ബ" + latin:moreKeys="ഭ" /> + <!-- U+0D2E: "à´®" MALAYALAM LETTER MA + U+0D02: "à´‚" MALAYALAM SIGN ANUSVARA --> + <Key + latin:keySpec="മ" + latin:moreKeys="ം" /> + <!-- U+0D2F: "à´¯" MALAYALAM LETTER YA + U+0D4D/U+0D2F: "àµà´¯" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER YA --> + <Key + latin:keySpec="യ" + latin:moreKeys="്യ" /> + <!-- U+0D30: "à´°" MALAYALAM LETTER RA + U+0D4D/U+0D30: "àµà´°" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER RA + U+0D7C: "ർ" MALAYALAM LETTER CHILLU RR + U+0D31: "à´±" MALAYALAM LETTER RRA --> + <Key + latin:keySpec="ര" + latin:moreKeys="്ര,ർ,റ" /> + <!-- U+0D32: "à´²" MALAYALAM LETTER LA + U+0D7D: "ൽ" MALAYALAM LETTER CHILLU L --> + <Key + latin:keySpec="ല" + latin:moreKeys="ൽ" /> + <!-- U+0D35: "à´µ" MALAYALAM LETTER VA + U+0D4D/U+0D35: "àµà´µ" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER VA --> + <Key + latin:keySpec="വ" + latin:moreKeys="്വ" /> + <!-- U+0D36: "à´¶" MALAYALAM LETTER SHA + U+0D37: "à´·" MALAYALAM LETTER SSA + U+0D38: "à´¸" MALAYALAM LETTER SA --> + <Key + latin:keySpec="ശ" + latin:moreKeys="ഷ,സ" /> + <!-- U+0D39: "à´¹" MALAYALAM LETTER HA + U+0D03: "à´ƒ" MALAYALAM SIGN VISARGA --> + <Key + latin:keySpec="ഹ" + latin:moreKeys="ഃ" /> + <!-- U+0D33: "à´³" MALAYALAM LETTER LLA + U+0D7E: "ൾ" MALAYALAM LETTER CHILLU LL + U+0D34: "à´´" MALAYALAM LETTER LLLA --> + <Key + latin:keySpec="ള" + latin:moreKeys="ൾ,ഴ" /> +</merge> diff --git a/java/res/xml/rows_malayalam.xml b/java/res/xml/rows_malayalam.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e7a4916c0a94cc5718f87b52cdc8d75317ae774 --- /dev/null +++ b/java/res/xml/rows_malayalam.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <include latin:keyboardLayout="@xml/key_styles_common" /> + <Row + latin:keyWidth="9.091%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam1" /> + </Row> + <Row + latin:keyWidth="9.091%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam2" /> + </Row> + <Row + latin:keyWidth="9.091%p" + latin:keyLabelFlags="fontNormal|autoXScale" + > + <include latin:keyboardLayout="@xml/rowkeys_malayalam3" /> + <Key + latin:keyStyle="deleteKeyStyle" + latin:keyWidth="fillRight" /> + </Row> + <include latin:keyboardLayout="@xml/row_qwerty4" /> +</merge> \ No newline at end of file diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index 8b8a9dd2a9984a9075ad2c9b1b7cc6fde5258a78..4c8c37ae8816692a37f050b5293458be7f1672d1 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -88,7 +88,7 @@ public final class KeyboardTextsTable { /* 2:30 */ "morekeys_u", /* 3:29 */ "morekeys_e", /* 4:28 */ "morekeys_i", - /* 5:25 */ "keylabel_to_alpha", + /* 5:26 */ "keylabel_to_alpha", /* 6:23 */ "morekeys_c", /* 7:23 */ "double_quotes", /* 8:22 */ "morekeys_n", @@ -96,8 +96,8 @@ public final class KeyboardTextsTable { /* 10:20 */ "morekeys_s", /* 11:14 */ "morekeys_y", /* 12:13 */ "morekeys_d", - /* 13:12 */ "morekeys_z", - /* 14:12 */ "keyspec_currency", + /* 13:13 */ "keyspec_currency", + /* 14:12 */ "morekeys_z", /* 15:10 */ "morekeys_t", /* 16:10 */ "morekeys_l", /* 17: 9 */ "morekeys_g", @@ -267,11 +267,11 @@ public final class KeyboardTextsTable { /* morekeys_n */ EMPTY, /* single_quotes */ "!text/single_lqm_rqm", /* morekeys_s ~ */ - EMPTY, EMPTY, EMPTY, EMPTY, - /* ~ morekeys_z */ - /* keyspec_currency */ "$", - /* morekeys_t ~ */ EMPTY, EMPTY, EMPTY, + /* ~ morekeys_d */ + /* keyspec_currency */ "$", + /* morekeys_z ~ */ + EMPTY, EMPTY, EMPTY, EMPTY, /* ~ morekeys_g */ /* single_angle_quotes */ "!text/single_laqm_raqm", /* double_angle_quotes */ "!text/double_laqm_raqm", @@ -764,8 +764,8 @@ public final class KeyboardTextsTable { // U+0997: "ग" BENGALI LETTER GA /* keylabel_to_alpha */ "\u0995\u0996\u0997", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+09F3: "à§³" BENGALI RUPEE SIGN /* keyspec_currency */ "\u09F3", }; @@ -909,11 +909,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u010F", + /* keyspec_currency */ 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 /* morekeys_z */ "\u017E,\u017A,\u017C", - /* keyspec_currency */ null, // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON /* morekeys_t */ "\u0165", /* morekeys_l */ null, @@ -968,7 +968,7 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+00F0: "ð" LATIN SMALL LETTER ETH /* morekeys_d */ "\u00F0", - /* morekeys_z ~ */ + /* keyspec_currency ~ */ null, null, null, /* ~ morekeys_t */ // U+0142: "Å‚" LATIN SMALL LETTER L WITH STROKE @@ -1209,11 +1209,11 @@ public final class KeyboardTextsTable { // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON // U+0111: "Ä‘" LATIN SMALL LETTER D WITH STROKE /* morekeys_d */ "\u00F0,\u010F,\u0111", + /* keyspec_currency */ null, // 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 /* morekeys_z */ "\u017A,\u017C,\u017E", - /* keyspec_currency */ null, // 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 @@ -1403,11 +1403,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u010F", + /* keyspec_currency */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE /* morekeys_z */ "\u017E,\u017C,\u017A", - /* keyspec_currency */ null, // U+0163: "Å£" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON /* morekeys_t */ "\u0163,\u0165", @@ -1505,13 +1505,13 @@ public final class KeyboardTextsTable { // U+067E: "Ù¾" ARABIC LETTER PEH /* keylabel_to_alpha */ "\u0627\u200C\u0628\u200C\u067E", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+FDFC: "ï·¼" RIAL SIGN /* keyspec_currency */ "\uFDFC", - /* morekeys_t ~ */ + /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, + null, null, null, /* ~ morekeys_cyrillic_soft_sign */ // U+06F1: "Û±" EXTENDED ARABIC-INDIC DIGIT ONE /* keyspec_symbols_1 */ "\u06F1", @@ -1663,14 +1663,15 @@ public final class KeyboardTextsTable { // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+015B: "Å›" LATIN SMALL LETTER S WITH ACUTE /* morekeys_s */ "\u0161,\u00DF,\u015B", - /* morekeys_y */ null, - /* morekeys_d */ null, + /* morekeys_y ~ */ + null, null, null, + /* ~ keyspec_currency */ // 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 /* morekeys_z */ "\u017E,\u017A,\u017C", - /* keyspec_currency ~ */ - null, null, null, null, null, null, null, null, null, + /* morekeys_t ~ */ + null, null, null, null, null, null, null, null, /* ~ morekeys_cyrillic_ie */ // U+00E5: "Ã¥" LATIN SMALL LETTER A WITH RING ABOVE /* keyspec_nordic_row1_11 */ "\u00E5", @@ -1826,13 +1827,13 @@ public final class KeyboardTextsTable { // U+0917: "ग" DEVANAGARI LETTER GA /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", - /* morekeys_t ~ */ + /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, + null, null, null, /* ~ morekeys_cyrillic_soft_sign */ // U+0967: "१" DEVANAGARI DIGIT ONE /* keyspec_symbols_1 */ "\u0967", @@ -1889,12 +1890,13 @@ public final class KeyboardTextsTable { /* morekeys_y */ null, // U+0111: "Ä‘" LATIN SMALL LETTER D WITH STROKE /* morekeys_d */ "\u0111", + /* keyspec_currency */ 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 /* morekeys_z */ "\u017E,\u017A,\u017C", - /* keyspec_currency ~ */ - null, null, null, null, + /* morekeys_t ~ */ + null, null, null, /* ~ morekeys_g */ /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", @@ -2068,8 +2070,8 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+00F0: "ð" LATIN SMALL LETTER ETH /* morekeys_d */ "\u00F0", - /* morekeys_z */ null, /* keyspec_currency */ null, + /* morekeys_z */ null, // U+00FE: "þ" LATIN SMALL LETTER THORN /* morekeys_t */ "\u00FE", }; @@ -2152,15 +2154,15 @@ public final class KeyboardTextsTable { /* morekeys_n */ null, /* single_quotes */ "!text/single_rqm_9qm", /* morekeys_s ~ */ - null, null, null, null, - /* ~ morekeys_z */ + null, null, null, + /* ~ morekeys_d */ // U+20AA: "₪" NEW SHEQEL SIGN /* keyspec_currency */ "\u20AA", - /* morekeys_t ~ */ + /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, + null, null, null, /* ~ morekeys_swiss_row2_11 */ // U+2605: "★" BLACK STAR /* morekeys_star */ "\u2605", @@ -2349,8 +2351,8 @@ public final class KeyboardTextsTable { // U+0E84: "ຄ" LAO LETTER KHO TAM /* keylabel_to_alpha */ "\u0E81\u0E82\u0E84", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+20AD: "â‚" KIP SIGN /* keyspec_currency */ "\u20AD", }; @@ -2424,11 +2426,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u010F", + /* keyspec_currency */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE /* morekeys_z */ "\u017E,\u017C,\u017A", - /* keyspec_currency */ null, // U+0163: "Å£" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON /* morekeys_t */ "\u0163,\u0165", @@ -2518,11 +2520,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u010F", + /* keyspec_currency */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE /* morekeys_z */ "\u017E,\u017C,\u017A", - /* keyspec_currency */ null, // U+0163: "Å£" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON /* morekeys_t */ "\u0163,\u0165", @@ -2582,6 +2584,21 @@ public final class KeyboardTextsTable { /* keyspec_south_slavic_row3_8 */ "\u0453", }; + /* Locale ml_IN: Malayalam (India) */ + private static final String[] TEXTS_ml_IN = { + /* morekeys_a ~ */ + null, null, null, null, null, + /* ~ morekeys_i */ + // Label for "switch to alphabetic" key. + // U+0D05: "à´…" MALAYALAM LETTER A + /* keylabel_to_alpha */ "\u0D05", + /* morekeys_c ~ */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ + // U+20B9: "₹" INDIAN RUPEE SIGN + /* keyspec_currency */ "\u20B9", + }; + /* Locale mn_MN: Mongolian (Mongolia) */ private static final String[] TEXTS_mn_MN = { /* morekeys_a ~ */ @@ -2593,8 +2610,8 @@ public final class KeyboardTextsTable { // U+0412: "Ð’" CYRILLIC CAPITAL LETTER VE /* keylabel_to_alpha */ "\u0410\u0411\u0412", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+20AE: "â‚®" TUGRIK SIGN /* keyspec_currency */ "\u20AE", }; @@ -2610,13 +2627,13 @@ public final class KeyboardTextsTable { // U+0917: "ग" DEVANAGARI LETTER GA /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+20B9: "₹" INDIAN RUPEE SIGN /* keyspec_currency */ "\u20B9", - /* morekeys_t ~ */ + /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, + null, null, null, /* ~ morekeys_cyrillic_soft_sign */ // U+0967: "१" DEVANAGARI DIGIT ONE /* keyspec_symbols_1 */ "\u0967", @@ -2757,13 +2774,13 @@ public final class KeyboardTextsTable { // U+0917: "ग" DEVANAGARI LETTER GA /* keylabel_to_alpha */ "\u0915\u0916\u0917", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+0930/U+0941/U+002E "रà¥." NEPALESE RUPEE SIGN /* keyspec_currency */ "\u0930\u0941.", - /* morekeys_t ~ */ + /* morekeys_z ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, + null, null, null, /* ~ morekeys_cyrillic_soft_sign */ // U+0967: "१" DEVANAGARI DIGIT ONE /* keyspec_symbols_1 */ "\u0967", @@ -2898,13 +2915,13 @@ public final class KeyboardTextsTable { // U+00DF: "ß" LATIN SMALL LETTER SHARP S // U+0161: "Å¡" LATIN SMALL LETTER S WITH CARON /* morekeys_s */ "\u015B,\u00DF,\u0161", - /* morekeys_y */ null, - /* morekeys_d */ null, + /* morekeys_y ~ */ + null, null, null, + /* ~ keyspec_currency */ // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON /* morekeys_z */ "\u017C,\u017A,\u017E", - /* keyspec_currency */ null, /* morekeys_t */ null, // U+0142: "Å‚" LATIN SMALL LETTER L WITH STROKE /* morekeys_l */ "\u0142", @@ -3006,7 +3023,7 @@ public final class KeyboardTextsTable { /* morekeys_s */ "\u0219,\u00DF,\u015B,\u0161", /* morekeys_y ~ */ null, null, null, null, - /* ~ keyspec_currency */ + /* ~ morekeys_z */ // U+021B: "È›" LATIN SMALL LETTER T WITH COMMA BELOW /* morekeys_t */ "\u021B", }; @@ -3125,11 +3142,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u00FD,\u00FF", // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u010F", + /* keyspec_currency */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE /* morekeys_z */ "\u017E,\u017C,\u017A", - /* keyspec_currency */ null, // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON // U+0163: "Å£" LATIN SMALL LETTER T WITH CEDILLA /* morekeys_t */ "\u0165,\u0163", @@ -3167,10 +3184,11 @@ public final class KeyboardTextsTable { /* morekeys_y */ null, // U+0111: "Ä‘" LATIN SMALL LETTER D WITH STROKE /* morekeys_d */ "\u0111", + /* keyspec_currency */ null, // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON /* morekeys_z */ "\u017E", - /* keyspec_currency ~ */ - null, null, null, null, + /* morekeys_t ~ */ + null, null, null, /* ~ morekeys_g */ /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", @@ -3290,11 +3308,11 @@ public final class KeyboardTextsTable { // U+00F0: "ð" LATIN SMALL LETTER ETH // U+010F: "Ä" LATIN SMALL LETTER D WITH CARON /* morekeys_d */ "\u00F0,\u010F", + /* keyspec_currency */ null, // U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE // U+017E: "ž" LATIN SMALL LETTER Z WITH CARON // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE /* morekeys_z */ "\u017A,\u017E,\u017C", - /* keyspec_currency */ null, // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON // U+00FE: "þ" LATIN SMALL LETTER THORN /* morekeys_t */ "\u0165,\u00FE", @@ -3389,8 +3407,8 @@ public final class KeyboardTextsTable { // U+0BB4/U+0BCD: "à®´à¯" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA /* keylabel_to_alpha */ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+0BF9: "௹" TAMIL RUPEE SIGN /* keyspec_currency */ "\u0BF9", }; @@ -3406,8 +3424,8 @@ public final class KeyboardTextsTable { // U+0E04: "ค" THAI CHARACTER KHO KHWAI /* keylabel_to_alpha */ "\u0E01\u0E02\u0E04", /* morekeys_c ~ */ - null, null, null, null, null, null, null, null, - /* ~ morekeys_z */ + null, null, null, null, null, null, null, + /* ~ morekeys_d */ // U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT /* keyspec_currency */ "\u0E3F", }; @@ -3530,12 +3548,12 @@ public final class KeyboardTextsTable { /* morekeys_n */ null, /* single_quotes */ "!text/single_9qm_lqm", /* morekeys_s ~ */ - null, null, null, null, - /* ~ morekeys_z */ + null, null, null, + /* ~ morekeys_d */ // U+20B4: "â‚´" HRYVNIA SIGN /* keyspec_currency */ "\u20B4", - /* morekeys_t ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, + /* morekeys_z ~ */ + null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ morekeys_nordic_row2_10 */ // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA /* keyspec_east_slavic_row1_9 */ "\u0449", @@ -3640,7 +3658,6 @@ public final class KeyboardTextsTable { /* morekeys_y */ "\u1EF3,\u00FD,\u1EF7,\u1EF9,\u1EF5", // U+0111: "Ä‘" LATIN SMALL LETTER D WITH STROKE /* morekeys_d */ "\u0111", - /* morekeys_z */ null, // U+20AB: "â‚«" DONG SIGN /* keyspec_currency */ "\u20AB", }; @@ -3785,11 +3802,11 @@ public final class KeyboardTextsTable { // U+0111: "Ä‘" LATIN SMALL LETTER D WITH STROKE // U+00F0: "ð" LATIN SMALL LETTER ETH /* morekeys_d */ "\u010F,\u0111,\u00F0", + /* keyspec_currency */ null, // 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 /* morekeys_z */ "\u017A,\u017C,\u017E", - /* keyspec_currency */ null, // U+00FE: "þ" LATIN SMALL LETTER THORN // U+0163: "Å£" LATIN SMALL LETTER T WITH CEDILLA // U+0165: "Å¥" LATIN SMALL LETTER T WITH CARON @@ -3841,7 +3858,7 @@ public final class KeyboardTextsTable { "az_AZ" , TEXTS_az_AZ, /* 8/ 18 Azerbaijani (Azerbaijan) */ "be_BY" , TEXTS_be_BY, /* 9/ 32 Belarusian (Belarus) */ "bg" , TEXTS_bg, /* 2/ 8 Bulgarian */ - "bn_IN" , TEXTS_bn_IN, /* 2/ 15 Bengali (India) */ + "bn_IN" , TEXTS_bn_IN, /* 2/ 14 Bengali (India) */ "ca" , TEXTS_ca, /* 11/ 96 Catalan */ "cs" , TEXTS_cs, /* 17/ 21 Czech */ "da" , TEXTS_da, /* 19/ 54 Danish */ @@ -3867,11 +3884,12 @@ public final class KeyboardTextsTable { "kk" , TEXTS_kk, /* 15/121 Kazakh */ "km_KH" , TEXTS_km_KH, /* 2/122 Khmer (Cambodia) */ "ky" , TEXTS_ky, /* 10/ 89 Kirghiz */ - "lo_LA" , TEXTS_lo_LA, /* 2/ 15 Lao (Laos) */ + "lo_LA" , TEXTS_lo_LA, /* 2/ 14 Lao (Laos) */ "lt" , TEXTS_lt, /* 18/ 22 Lithuanian */ "lv" , TEXTS_lv, /* 18/ 22 Latvian */ "mk" , TEXTS_mk, /* 9/ 94 Macedonian */ - "mn_MN" , TEXTS_mn_MN, /* 2/ 15 Mongolian (Mongolia) */ + "ml_IN" , TEXTS_ml_IN, /* 2/ 14 Malayalam (India) */ + "mn_MN" , TEXTS_mn_MN, /* 2/ 14 Mongolian (Mongolia) */ "mr_IN" , TEXTS_mr_IN, /* 23/ 53 Marathi (India) */ "my_MM" , TEXTS_my_MM, /* 8/104 Burmese (Myanmar) */ "nb" , TEXTS_nb, /* 11/ 54 Norwegian BokmÃ¥l */ @@ -3888,12 +3906,12 @@ public final class KeyboardTextsTable { "sr" , TEXTS_sr, /* 11/ 94 Serbian */ "sv" , TEXTS_sv, /* 21/ 54 Swedish */ "sw" , TEXTS_sw, /* 9/ 18 Swahili */ - "ta_IN" , TEXTS_ta_IN, /* 2/ 15 Tamil (India) */ - "th" , TEXTS_th, /* 2/ 15 Thai */ + "ta_IN" , TEXTS_ta_IN, /* 2/ 14 Tamil (India) */ + "th" , TEXTS_th, /* 2/ 14 Thai */ "tl" , TEXTS_tl, /* 7/ 9 Tagalog */ "tr" , TEXTS_tr, /* 7/ 18 Turkish */ "uk" , TEXTS_uk, /* 11/ 88 Ukrainian */ - "vi" , TEXTS_vi, /* 8/ 15 Vietnamese */ + "vi" , TEXTS_vi, /* 8/ 14 Vietnamese */ "zu" , TEXTS_zu, /* 8/ 11 Zulu */ "zz" , TEXTS_zz, /* 19/112 Alphabet */ }; diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java index 67b87200f4f47b601742ab73167e754870ef7284..056fe1bd6f8dcae19963b2e16cfbd3fc4a36b2e9 100644 --- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java +++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java @@ -25,7 +25,7 @@ import java.util.ArrayList; @SmallTest public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase { - private static final int NUMBER_OF_SUBTYPES = 74; + private static final int NUMBER_OF_SUBTYPES = 75; private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 45; private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2; diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java b/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java new file mode 100644 index 0000000000000000000000000000000000000000..b44b888e185d69be92622fea89855b042b652c70 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/Malayalam.java @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout; + +import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; +import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; +import com.android.inputmethod.latin.Constants; + +import java.util.Locale; + +/** + * The Malayalam keyboard. + */ +public final class Malayalam extends LayoutBase { + private static final String LAYOUT_NAME = "malayalam"; + + public Malayalam(final LayoutCustomizer customizer) { + super(customizer, Symbols.class, SymbolsShifted.class); + } + + @Override + public String getName() { return LAYOUT_NAME; } + + public static class MalayalamCustomizer extends LayoutCustomizer { + public MalayalamCustomizer(final Locale locale) { super(locale); } + + @Override + public ExpectedKey getAlphabetKey() { return MALAYALAM_ALPHABET_KEY; } + + @Override + public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; } + + @Override + public ExpectedKey[] getOtherCurrencyKeys() { + return SymbolsShifted.CURRENCIES_OTHER_GENERIC; + } + + @Override + public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) { + return EMPTY_KEYS; + } + + @Override + public ExpectedKey[] getRightShiftKeys(final boolean isPhone) { + return isPhone ? EMPTY_KEYS : EXCLAMATION_AND_QUESTION_MARKS; + } + + // U+0D05: "à´…" MALAYALAM LETTER A + private static final ExpectedKey MALAYALAM_ALPHABET_KEY = key( + "\u0D05", Constants.CODE_SWITCH_ALPHA_SYMBOL); + + // U+20B9: "₹" INDIAN RUPEE SIGN + private static final ExpectedKey CURRENCY_RUPEE = key("\u20B9", + Symbols.CURRENCY_GENERIC_MORE_KEYS); + } + + @Override + ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) { return ALPHABET_COMMON; } + + @Override + ExpectedKey[][] getCommonAlphabetShiftLayout(boolean isPhone, final int elementId) { + return null; + } + + private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() + .setKeysOfRow(1, + // U+0D4D: "àµ" MALAYALAM SIGN VIRAMA + // U+0D05: "à´…" MALAYALAM LETTER A + key("\u0D4D", joinMoreKeys("\u0D05", "1")), + // U+0D3E: "à´¾" MALAYALAM VOWEL SIGN AA + // U+0D06: "à´†" MALAYALAM LETTER AA + key("\u0D3E", joinMoreKeys("\u0D06", "2")), + // U+0D3F: "à´¿" MALAYALAM VOWEL SIGN I + // U+0D07: "à´‡" MALAYALAM LETTER I + key("\u0D3F", joinMoreKeys("\u0D07", "3")), + // U+0D40: "ീ" MALAYALAM VOWEL SIGN II + // U+0D08: "à´ˆ" MALAYALAM LETTER II + key("\u0D40", joinMoreKeys("\u0D08", "4")), + // U+0D41: "àµ" MALAYALAM VOWEL SIGN U + // U+0D09: "à´‰" MALAYALAM LETTER U + key("\u0D41", joinMoreKeys("\u0D09", "5")), + // U+0D42: "ൂ" MALAYALAM VOWEL SIGN UU + // U+0D0A: "à´Š" MALAYALAM LETTER UU + key("\u0D42", joinMoreKeys("\u0D0A", "6")), + // U+0D43: "ൃ" MALAYALAM VOWEL SIGN VOCALIC R + // U+0D0B: "à´‹" MALAYALAM LETTER VOCALIC R + key("\u0D43", joinMoreKeys("\u0D0B", "7")), + // U+0D46: "െ" MALAYALAM VOWEL SIGN E + // U+0D0E: "à´Ž" MALAYALAM LETTER E + // U+0D10: "à´" MALAYALAM LETTER AI + // U+0D48: "ൈ" MALAYALAM VOWEL SIGN AI + key("\u0D46", joinMoreKeys("\u0D0E", "\u0D10", "\u0D48", "8")), + // U+0D47: "േ" MALAYALAM VOWEL SIGN EE + // U+0D0F: "à´" MALAYALAM LETTER EE + key("\u0D47", joinMoreKeys("\u0D0F", "9")), + // U+0D4A: "ൊ" MALAYALAM VOWEL SIGN O + // U+0D12: "à´’" MALAYALAM LETTER O + key("\u0D4A", joinMoreKeys("\u0D12", "0")), + // U+0D4B: "ോ" MALAYALAM VOWEL SIGN OO + // U+0D13: "à´“" MALAYALAM LETTER OO + // U+0D14: "à´”" MALAYALAM LETTER AU + // U+0D57: "ൗ" MALAYALAM AU LENGTH MARK + key("\u0D4B", joinMoreKeys("\u0D13", "\u0D14", "\u0D57"))) + .setKeysOfRow(2, + // U+0D15: "à´•" MALAYALAM LETTER KA + // U+0D16: "à´–" MALAYALAM LETTER KHA + key("\u0D15", moreKey("\u0D16")), + // U+0D17: "à´—" MALAYALAM LETTER GA + // U+0D18: "à´˜" MALAYALAM LETTER GHA + key("\u0D17", moreKey("\u0D18")), + // U+0D19: "à´™" MALAYALAM LETTER NGA + // U+0D1E: "à´ž" MALAYALAM LETTER NYA + key("\u0D19", moreKey("\u0D1E")), + // U+0D1A: "à´š" MALAYALAM LETTER CA + // U+0D1B: "à´›" MALAYALAM LETTER CHA + key("\u0D1A", moreKey("\u0D1B")), + // U+0D1C: "à´œ" MALAYALAM LETTER JA + // U+0D1D: "à´" MALAYALAM LETTER JHA + key("\u0D1C", moreKey("\u0D1D")), + // U+0D1F: "à´Ÿ" MALAYALAM LETTER TTA + // U+0D20: "à´ " MALAYALAM LETTER TTHA + key("\u0D1F", moreKey("\u0D20")), + // U+0D21: "à´¡" MALAYALAM LETTER DDA + // U+0D22: "à´¢" MALAYALAM LETTER DDHA + key("\u0D21", moreKey("\u0D22")), + // U+0D23: "à´£" MALAYALAM LETTER NNA + // U+0D7A: "ൺ" MALAYALAM LETTER CHILLU NN + key("\u0D23", moreKey("\u0D7A")), + // U+0D24: "à´¤" MALAYALAM LETTER TA + // U+0D25: "à´¥" MALAYALAM LETTER THA + key("\u0D24", moreKey("\u0D25")), + // U+0D26: "à´¦" MALAYALAM LETTER DA + // U+0D27: "à´§" MALAYALAM LETTER DHA + key("\u0D26", moreKey("\u0D27")), + // U+0D28: "à´—à´¨" MALAYALAM LETTER NA + // U+0D7B: "ൻ" MALAYALAM LETTER CHILLU N + key("\u0D28", moreKey("\u0D7B"))) + .setKeysOfRow(3, + // U+0D2A: "à´ª" MALAYALAM LETTER PA + // U+0D2B: "à´«" MALAYALAM LETTER PHA + key("\u0D2A", moreKey("\u0D2B")), + // U+0D2C: "à´¬" MALAYALAM LETTER BA + // U+0D2D: "à´" MALAYALAM LETTER BHA + key("\u0D2C", moreKey("\u0D2D")), + // U+0D2E: "à´®" MALAYALAM LETTER MA + // U+0D02: "à´‚" MALAYALAM SIGN ANUSVARA + key("\u0D2E", moreKey("\u0D02")), + // U+0D2F: "à´¯" MALAYALAM LETTER YA + // U+0D4D/U+0D2F: "àµà´¯" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER YA + key("\u0D2F", moreKey("\u0D4D\u0D2F")), + // U+0D30: "à´°" MALAYALAM LETTER RA + // U+0D4D/U+0D30: "àµà´°" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER RA + // U+0D7C: "ർ" MALAYALAM LETTER CHILLU RR + // U+0D31: "à´±" MALAYALAM LETTER RRA + key("\u0D30", joinMoreKeys("\u0D4D\u0D30", "\u0D7C", "\u0D31")), + // U+0D32: "à´²" MALAYALAM LETTER LA + // U+0D7D: "ൽ" MALAYALAM LETTER CHILLU L + key("\u0D32", moreKey("\u0D7D")), + // U+0D35: "à´µ" MALAYALAM LETTER VA + // U+0D4D/U+0D35: "àµà´µ" MALAYALAM SIGN VIRAMA/MALAYALAM LETTER VA + key("\u0D35", moreKey("\u0D4D\u0D35")), + // U+0D36: "à´¶" MALAYALAM LETTER SHA + // U+0D37: "à´·" MALAYALAM LETTER SSA + // U+0D38: "à´¸" MALAYALAM LETTER SA + key("\u0D36", joinMoreKeys("\u0D37", "\u0D38")), + // U+0D39: "à´¹" MALAYALAM LETTER HA + // U+0D03: "à´ƒ" MALAYALAM SIGN VISARGA + key("\u0D39", moreKey("\u0D03")), + // U+0D33: "à´³" MALAYALAM LETTER LLA + // U+0D7E: "ൾ" MALAYALAM LETTER CHILLU LL + // U+0D34: "à´´" MALAYALAM LETTER LLLA + key("\u0D33", joinMoreKeys("\u0D7E", "\u0D34"))) + .build(); +} diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java new file mode 100644 index 0000000000000000000000000000000000000000..f937de89ab66686ed335557cfad6be6fc1b8f729 --- /dev/null +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMalayalamIN.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.keyboard.layout.tests; + +import android.test.suitebuilder.annotation.SmallTest; + +import com.android.inputmethod.keyboard.layout.LayoutBase; +import com.android.inputmethod.keyboard.layout.Malayalam; +import com.android.inputmethod.keyboard.layout.Malayalam.MalayalamCustomizer; + +import java.util.Locale; + +/** + * ta_IN: Malayalam (India)/malayalam + */ +@SmallTest +public final class TestsMalayalamIN extends LayoutTestsBase { + private static final Locale LOCALE = new Locale("ml", "IN"); + private static final LayoutBase LAYOUT = new Malayalam(new MalayalamCustomizer(LOCALE)); + + @Override + LayoutBase getLayout() { return LAYOUT; } +} diff --git a/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml new file mode 100644 index 0000000000000000000000000000000000000000..7a2aeed361fcb9d262f8d1ff22e47629257e1a73 --- /dev/null +++ b/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0D05: "à´…" MALAYALAM LETTER A --> + <string name="keylabel_to_alpha">അ</string> + <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> + <string name="keyspec_currency">₹</string> +</resources>