From 8160b1ac055e062e02d0f19b98a5a1cff680a8b0 Mon Sep 17 00:00:00 2001 From: Sabbir <64514438+shmVirus@users.noreply.github.com> Date: Sun, 25 Jun 2023 10:12:46 +0000 Subject: [PATCH] Add Bengali Provat Layout (#357) * Add Bengali Provat Layout I added bengali_provat layout and renamed old bengali to actual layout name. --- res/values/arrays.xml | 6 ++-- res/xml/{bangla.xml => bengali_national.xml} | 0 res/xml/bengali_provat.xml | 37 ++++++++++++++++++++ srcs/juloo.keyboard2/Config.java | 3 +- srcs/juloo.keyboard2/KeyValue.java | 3 ++ 5 files changed, 46 insertions(+), 3 deletions(-) rename res/xml/{bangla.xml => bengali_national.xml} (100%) create mode 100644 res/xml/bengali_provat.xml diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 77dae9c..840dde4 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -27,7 +27,8 @@ neo2 bone jcuken_ua - bangla + bengali_national + bengali_provat devanagari_1 devanagari_2 he_il_1452_1 @@ -65,7 +66,8 @@ Neo 2 Bone ЙЦУКЕН (Українська) - বাংলা + বাংলা (জাতীয়) + বাংলা (প্রভাত) देवनागरी (हिंदी)-1 देवनागरी (हिंदी)-2 Hebrew SI-1452-1 diff --git a/res/xml/bangla.xml b/res/xml/bengali_national.xml similarity index 100% rename from res/xml/bangla.xml rename to res/xml/bengali_national.xml diff --git a/res/xml/bengali_provat.xml b/res/xml/bengali_provat.xml new file mode 100644 index 0000000..caaa836 --- /dev/null +++ b/res/xml/bengali_provat.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 3e9d624..00c8308 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -343,7 +343,8 @@ final class Config switch (name) { case "azerty": id = R.xml.azerty; break; - case "bangla": id = R.xml.bangla; break; + case "bengali_national": id = R.xml.bengali_national; break; + case "bengali_provat": id = R.xml.bengali_provat; break; case "bgph1": id = R.xml.local_bgph1; break; case "bone": id = R.xml.bone; break; case "colemak": id = R.xml.colemak; break; diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 9f4d985..0904f2f 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -420,6 +420,9 @@ final class KeyValue case "ole_placeholder": return placeholderKey(Placeholder.OLE); case "meteg": return charKey("\u05DE\u05BD", '\u05BD', 0); // or siluq or sof-pasuq case "meteg_placeholder": return placeholderKey(Placeholder.METEG); + /* intending/preventing ligature - supported by many scripts*/ + case "zwj": return charKey("zwj", '\u200D', 0); // zero-width joiner (provides ligature) + case "zwnj": return charKey("zwnj", '\u200C', 0); // zero-width non joiner (prevents unintended ligature) case "copy": return editingKey("copy", Editing.COPY); case "paste": return editingKey("paste", Editing.PASTE);