From 6aaa4973935659e40b3300e9326b888cf381545d Mon Sep 17 00:00:00 2001 From: Luke Videckis Date: Sat, 11 Mar 2023 08:43:17 -0700 Subject: [PATCH] New Hindi layout (#313) * New Hindi layout * Update default layout for Marathi, Nepali * Consistent naming for Devanagari layouts --- res/values/arrays.xml | 6 ++- res/xml/{hindi.xml => devanagari_1.xml} | 0 res/xml/devanagari_2.xml | 30 +++++++++++++ res/xml/method.xml | 4 +- srcs/juloo.keyboard2/Config.java | 3 +- srcs/juloo.keyboard2/KeyModifier.java | 56 +++++++++++++++++++++++++ 6 files changed, 95 insertions(+), 4 deletions(-) rename res/xml/{hindi.xml => devanagari_1.xml} (100%) create mode 100644 res/xml/devanagari_2.xml diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 989ad32..dacc0b4 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -28,7 +28,8 @@ bone jcuken_ua bangla - hindi + devanagari_1 + devanagari_2 he_il_1452_1 he_il_1452_2 custom @@ -61,7 +62,8 @@ Bone ЙЦУКЕН (Українська) বাংলা - हिन्दी + देवनागरी (हिंदी)-1 + देवनागरी (हिंदी)-2 Hebrew SI-1452-1 Hebrew SI-1452-2 @string/pref_layout_e_custom diff --git a/res/xml/hindi.xml b/res/xml/devanagari_1.xml similarity index 100% rename from res/xml/hindi.xml rename to res/xml/devanagari_1.xml diff --git a/res/xml/devanagari_2.xml b/res/xml/devanagari_2.xml new file mode 100644 index 0000000..7e1f770 --- /dev/null +++ b/res/xml/devanagari_2.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/xml/method.xml b/res/xml/method.xml index d81e300..8e91024 100644 --- a/res/xml/method.xml +++ b/res/xml/method.xml @@ -11,7 +11,9 @@ - + + + diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 3a28c75..a596f09 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -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; diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index 392b740..d9b5a47 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -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;