abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorJules Aguillon2023-12-26 17:16:29 +0100
committerJules Aguillon2023-12-26 17:16:29 +0100
commit7e7a5e4425a7825a9b0d899d6d13710acae82600 (patch)
tree4310220512a783a931f56b4a87d74f4dfb3962ba
parent9ff8179d490c9385df01b82ce8855956dced69cb (diff)
downloadunexpected-keyboard-7e7a5e4425a7825a9b0d899d6d13710acae82600.tar.gz
unexpected-keyboard-7e7a5e4425a7825a9b0d899d6d13710acae82600.zip
Separate arabic layouts with hindu or arabic numerals
This reverts the Tusinian layout (1af4e45) and instead introduce a new arabic PC layout with arabic numbers. Layouts are renamed: - arab_pc => arab_pc_hindu - arab_pc_tn => arab_pc
-rw-r--r--check_layout.output3
-rw-r--r--res/values/layouts.xml3
-rw-r--r--res/xml/arab_alt.xml2
-rw-r--r--res/xml/arab_pc.xml20
-rw-r--r--res/xml/arab_pc_ckb.xml2
-rw-r--r--res/xml/arab_pc_hindu.xml (renamed from res/xml/arab_pc_tn.xml)22
-rw-r--r--res/xml/method.xml4
-rw-r--r--srcs/juloo.keyboard2/KeyModifier.java4
8 files changed, 33 insertions, 27 deletions
diff --git a/check_layout.output b/check_layout.output
index ff13983..6b2e685 100644
--- a/check_layout.output
+++ b/check_layout.output
@@ -8,6 +8,9 @@ Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
# arab_pc_ckb
Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ., :, ;, <, =, >, ?, `, |, ~
1 warnings
+# arab_pc_hindu
+Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, |
+1 warnings
# arab_pc_ir
Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], `, {, |, }
1 warnings
diff --git a/res/values/layouts.xml b/res/values/layouts.xml
index eac29b1..14c1c32 100644
--- a/res/values/layouts.xml
+++ b/res/values/layouts.xml
@@ -9,6 +9,7 @@
<item>arab_alt</item>
<item>arab_pc</item>
<item>arab_pc_ckb</item>
+ <item>arab_pc_hindu</item>
<item>arab_pc_ir</item>
<item>armenian_ph_am</item>
<item>beng_national</item>
@@ -56,6 +57,7 @@
<item>Arabic Alt</item>
<item>Arabic PC</item>
<item>Kurdish (کوردی)</item>
+ <item>Arabic PC (Hindu numerals)</item>
<item>Persian PC</item>
<item>Armenian</item>
<item>বাংলা (জাতীয়)</item>
@@ -103,6 +105,7 @@
<item>@xml/arab_alt</item>
<item>@xml/arab_pc</item>
<item>@xml/arab_pc_ckb</item>
+ <item>@xml/arab_pc_hindu</item>
<item>@xml/arab_pc_ir</item>
<item>@xml/armenian_ph_am</item>
<item>@xml/beng_national</item>
diff --git a/res/xml/arab_alt.xml b/res/xml/arab_alt.xml
index f594f92..380d206 100644
--- a/res/xml/arab_alt.xml
+++ b/res/xml/arab_alt.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<keyboard name="Arabic Alt" script="arabic">
+<keyboard name="Arabic Alt" script="arabic" numpad_script="hindu-arabic">
<row>
<key key0="ض" key2="١" key3="`" key4="esc"/>
<key key0="ص" key2="٢" key3="\@"/>
diff --git a/res/xml/arab_pc.xml b/res/xml/arab_pc.xml
index 66a8fbd..62b086d 100644
--- a/res/xml/arab_pc.xml
+++ b/res/xml/arab_pc.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard name="Arabic PC" script="arabic">
<row>
- <key key0="ض" key1="&#1614;" key2="١" key3="`" key4="esc"/>
- <key key0="ص" key1="&#1611;" key2="٢" key3="\@"/>
- <key key0="ث" key1="&#1615;" key2="٣" key3="\#" key4="loc €"/>
- <key key0="ق" key1="&#1612;" key2="٤" key3="$" key4="loc £"/>
- <key key0="ف" key1="&#1604;&#1573;" key2="٥" key3="%"/>
- <key key0="غ" key1="&#1573;" key2="٦" key3="^"/>
- <key key0="ع" key1="&#8216;" key2="٧" key3="&amp;"/>
- <key key0="ه" key1="&#0247;" key2="٨" key3="*"/>
- <key key0="خ" key1="&#0215;" key2="٩" key3="("/>
- <key key0="ح" key1="&#1563;" key2="٠" key3=")"/>
+ <key key0="ض" key1="&#1614;" key2="1" key3="`" key4="esc"/>
+ <key key0="ص" key1="&#1611;" key2="2" key3="\@"/>
+ <key key0="ث" key1="&#1615;" key2="3" key3="\#" key4="loc €"/>
+ <key key0="ق" key1="&#1612;" key2="4" key3="$" key4="loc £"/>
+ <key key0="ف" key1="&#1604;&#1573;" key2="5" key3="%"/>
+ <key key0="غ" key1="&#1573;" key2="6" key3="^"/>
+ <key key0="ع" key1="&#8216;" key2="7" key3="&amp;"/>
+ <key key0="ه" key1="&#0247;" key2="8" key3="*"/>
+ <key key0="خ" key1="&#0215;" key2="9" key3="("/>
+ <key key0="ح" key1="&#1563;" key2="0" key3=")"/>
<key key0="ج" key1="&gt;" key2="-" key3="_" key4="f11_placeholder"/>
<key key0="د" key1="&lt;" key2="=" key3="ذ" key4="f12_placeholder"/>
<!-- <key key0="ذ" key1="&#1617;" key3="\\" key4="|"/> -->
diff --git a/res/xml/arab_pc_ckb.xml b/res/xml/arab_pc_ckb.xml
index 363e25f..0e9bd4f 100644
--- a/res/xml/arab_pc_ckb.xml
+++ b/res/xml/arab_pc_ckb.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<keyboard name="Kurdish (کوردی)" script="arabic">
+<keyboard name="Kurdish (کوردی)" script="arabic" numpad_script="hindu-arabic">
<row>
<key key0="ق" key1="ٯ" key2="١" key3="esc"/>
<key key0="و" key1="وو" key2="٢" key3="\@"/>
diff --git a/res/xml/arab_pc_tn.xml b/res/xml/arab_pc_hindu.xml
index 8441614..b25eed1 100644
--- a/res/xml/arab_pc_tn.xml
+++ b/res/xml/arab_pc_hindu.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
-<keyboard name="Tunisian" script="arabic">
+<keyboard name="Arabic PC (Hindu numerals)" script="arabic" numpad_script="hindu-arabic">
<row>
- <key key0="ض" key1="&#1614;" key2="1" key3="`" key4="esc"/>
- <key key0="ص" key1="&#1611;" key2="2" key3="\@"/>
- <key key0="ث" key1="&#1615;" key2="3" key3="\#" key4="loc €"/>
- <key key0="ق" key1="&#1612;" key2="4" key3="$" key4="loc £"/>
- <key key0="ف" key1="&#1604;&#1573;" key2="5" key3="%"/>
- <key key0="غ" key1="&#1573;" key2="6" key3="^"/>
- <key key0="ع" key1="&#8216;" key2="7" key3="&amp;"/>
- <key key0="ه" key1="&#0247;" key2="8" key3="*"/>
- <key key0="خ" key1="&#0215;" key2="9" key3="("/>
- <key key0="ح" key1="&#1563;" key2="0" key3=")"/>
+ <key key0="ض" key1="&#1614;" key2="١" key3="`" key4="esc"/>
+ <key key0="ص" key1="&#1611;" key2="٢" key3="\@"/>
+ <key key0="ث" key1="&#1615;" key2="٣" key3="\#" key4="loc €"/>
+ <key key0="ق" key1="&#1612;" key2="٤" key3="$" key4="loc £"/>
+ <key key0="ف" key1="&#1604;&#1573;" key2="٥" key3="%"/>
+ <key key0="غ" key1="&#1573;" key2="٦" key3="^"/>
+ <key key0="ع" key1="&#8216;" key2="٧" key3="&amp;"/>
+ <key key0="ه" key1="&#0247;" key2="٨" key3="*"/>
+ <key key0="خ" key1="&#0215;" key2="٩" key3="("/>
+ <key key0="ح" key1="&#1563;" key2="٠" key3=")"/>
<key key0="ج" key1="&gt;" key2="-" key3="_" key4="f11_placeholder"/>
<key key0="د" key1="&lt;" key2="=" key3="ذ" key4="f12_placeholder"/>
<!-- <key key0="ذ" key1="&#1617;" key3="\\" key4="|"/> -->
diff --git a/res/xml/method.xml b/res/xml/method.xml
index 08b4570..8afbaad 100644
--- a/res/xml/method.xml
+++ b/res/xml/method.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<input-method xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity="juloo.keyboard2.SettingsActivity" android:supportsSwitchingToNextInputMethod="true">
- <subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=arabic,default_layout=arab_pc"/>
- <subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar_TN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=arabic,default_layout=arab_pc_tn"/>
+ <subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=arabic,default_layout=arab_pc_hindu"/>
+ <subtype android:label="%s" android:languageTag="ar" android:imeSubtypeLocale="ar_TN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=arabic,default_layout=arab_pc"/>
<subtype android:label="%s" android:languageTag="ay" android:imeSubtypeLocale="ay_AM" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=armenian,default_layout=armenian_ph_am"/>
<subtype android:label="%s" android:languageTag="be" android:imeSubtypeLocale="be_BY" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_jcuken_ru,extra_keys=ґ|є|і|ї|ў"/>
<subtype android:label="%s" android:languageTag="bg" android:imeSubtypeLocale="bg_BG" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="script=cyrillic,default_layout=cyrl_ueishsht,extra_keys=€"/>
diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java
index ba3af2e..c1ed4e3 100644
--- a/srcs/juloo.keyboard2/KeyModifier.java
+++ b/srcs/juloo.keyboard2/KeyModifier.java
@@ -89,7 +89,7 @@ class KeyModifier
return map_char_none;
switch (numpad_script)
{
- case "arabic": return map_char_numpad_arabic;
+ case "hindu-arabic": return map_char_numpad_hindu;
case "bengali": return map_char_numpad_bengali;
case "devanagari": return map_char_numpad_devanagari;
case "persian": return map_char_numpad_persian;
@@ -997,7 +997,7 @@ class KeyModifier
}
};
- private static final Map_char map_char_numpad_arabic =
+ private static final Map_char map_char_numpad_hindu =
new Map_char() {
public String apply(char c)
{