New Hindi layout (#313)

* New Hindi layout
* Update default layout for Marathi, Nepali
* Consistent naming for Devanagari layouts
This commit is contained in:
Luke Videckis 2023-03-11 08:43:17 -07:00 committed by GitHub
parent bac228e6fb
commit 6aaa497393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 95 additions and 4 deletions

View File

@ -28,7 +28,8 @@
<item>bone</item>
<item>jcuken_ua</item>
<item>bangla</item>
<item>hindi</item>
<item>devanagari_1</item>
<item>devanagari_2</item>
<item>he_il_1452_1</item>
<item>he_il_1452_2</item>
<item>custom</item>
@ -61,7 +62,8 @@
<item>Bone</item>
<item>ЙЦУКЕН (Українська)</item>
<item>বাংলা</item>
<item>हिन्दी</item>
<item>देवनागरी (हिंदी)-1</item>
<item>देवनागरी (हिंदी)-2</item>
<item>Hebrew SI-1452-1</item>
<item>Hebrew SI-1452-2</item>
<item>@string/pref_layout_e_custom</item>

30
res/xml/devanagari_2.xml Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key shift="0.35" width="0.9" key0="क" key1="ख" key2="घ" key3="ङ" key4="ग"/>
<key width="0.9" key0="च" key1="छ" key2="झ" key3="ञ" key4="ज"/>
<key width="0.9" key0="ट" key1="ठ" key2="ढ" key3="ण" key4="ड"/>
<key width="0.9" key0="त" key1="थ" key2="ध" key3="न" key4="द"/>
<key width="0.9" key0="प" key1="फ" key2="भ" key3="म" key4="ब"/>
<key width="0.9" key0="र" key1="ज्ञ" key2="ल" key3="य" key4="व"/>
<key width="0.9" key0="ह" key1="श" key2="ळ" key3="स" key4="ष"/>
</row>
<row>
<key shift="0.35" width="0.9" key0="ा" key1="अ" key2="आ"/>
<key width="0.9" key0="ि" key1="इ"/>
<key width="0.9" key0="ी" key1="ई"/>
<key width="0.9" key0="ु" key1="उ" key2="ऊ" key4="ू"/>
<key width="0.9" key0="े" key1="ए" key2="ऋ" key4="ृ"/>
<key width="0.9" key0="ै" key1="ऐ" key2="ऌ" key4="ॢ"/>
<key width="0.9" key0="ो" key1="ओ" key2="औ" key4="ौ"/>
</row>
<row>
<key key0="्" key2="tab" key4="esc"/>
<key key0="ँ" key1="₹" key2="॑" key3="ॖ" key4="॓"/>
<key key0="ं" key1="ॐ" key2="ऽ" key3="" key4="&quot;"/>
<key key0="।" key1="," key2=";" key3="!" key4="\?"/>
<key key0="़" key1="॰" key2="" key3="-" key4="॒"/>
<key key0="५" key1="१" key2="३" key3="७" key4="९" key5="४" key6="६" key7="२" key8="८"/>
<key key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@ -11,7 +11,9 @@
<subtype android:label="%s" android:languageTag="es" android:imeSubtypeLocale="es_ES" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_es,extra_keys=accent_grave|accent_aigu|accent_tilde|accent_trema|€"/>
<subtype android:label="%s" android:languageTag="fr" android:imeSubtypeLocale="fr_FR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=azerty,extra_keys=accent_grave|accent_aigu|accent_circonflexe|accent_cedille|accent_trema|€"/>
<subtype android:label="%s" android:languageTag="he" android:imeSubtypeLocale="he_IL" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=he_il_1452_1,extra_keys=₪|€"/>
<subtype android:label="%s" android:languageTag="hi" android:imeSubtypeLocale="hi_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=hindi,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="hi" android:imeSubtypeLocale="hi_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="mr" android:imeSubtypeLocale="mr_IN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="ne" android:imeSubtypeLocale="ne_NE" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=devanagari_1,extra_keys=₹"/>
<subtype android:label="%s" android:languageTag="hu" android:imeSubtypeLocale="hu_HU" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_hu,extra_keys=accent_aigu|accent_trema|accent_ogonek|€"/>
<subtype android:label="%s" android:languageTag="it" android:imeSubtypeLocale="it_IT" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty,extra_keys=accent_grave|accent_aigu|€"/>
<subtype android:label="%s" android:languageTag="ko" android:imeSubtypeLocale="ko_KR" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_ko"/>

View File

@ -348,7 +348,8 @@ final class Config
case "bone": id = R.xml.bone; break;
case "colemak": id = R.xml.colemak; break;
case "dvorak": id = R.xml.dvorak; break;
case "hindi": id = R.xml.hindi; break;
case "devanagari_1": id = R.xml.devanagari_1; break;
case "devanagari_2": id = R.xml.devanagari_2; break;
case "jcuken_ua": id = R.xml.jcuken_ua; break;
case "neo2": id = R.xml.neo2; break;
case "qwerty": id = R.xml.qwerty; break;

View File

@ -281,6 +281,62 @@ class KeyModifier
case 'ס': return "segol";
case 'ב': return "hataf_segol"; // reduced segol
case 'צ': return "tsere";
// Devanagari symbols
case 'ए': return "";
case 'े': return "";
case 'ऐ': return "";
case 'ै': return "";
case 'ऋ': return "";
case 'ृ': return "";
case 'ळ': return "";
case 'र': return "";
case 'क': return "";
case 'ख': return "";
case 'ग': return "";
case 'घ': return "";
case 'ढ': return "";
case 'न': return "";
case 'ड': return "";
case 'ट': return "";
case 'ण': return "";
case 'फ': return "";
case 'ऌ': return "";
case 'ॢ': return "";
case 'औ': return "";
case 'ौ': return "";
case 'ओ': return "";
case 'ो': return "";
case 'च': return "";
case 'ज': return "";
case 'ब': return "ॿ";
case 'व': return "";
case 'य': return "";
case 'अ': return "";
case 'आ': return "";
case 'ा': return "";
case 'झ': return "";
case 'ई': return "";
case 'ी': return "";
case 'इ': return "";
case 'ि': return "";
case 'उ': return "";
case 'ऊ': return "";
case 'ु': return "";
case 'ष': return "क्ष";
case 'थ': return "त्र";
case 'द': return "द्र";
case 'प': return "प्र";
case 'श': return "श्र";
case 'छ': return "श्च";
case 'ँ': return "";
case '₹': return "";
case 'ॖ': return "";
case '॓': return "";
case '॰': return "";
case '।': return "";
case 'ं': return "";
case '़': return "";
case 'ऽ': return "";
// other
case ' ': return "nbsp";
default: return null;