From dcbb4c484cfd73fbd78194c62f2cf9bc5d7e4492 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 5 Aug 2023 19:20:48 +0200 Subject: [PATCH] Modify arabic and persian numbers info function keys And add function keys placeholders in the layouts. --- check_layout.output | 5 ++--- res/xml/arab_pc.xml | 4 ++-- res/xml/arab_pc_ir.xml | 2 +- srcs/juloo.keyboard2/KeyModifier.java | 25 +++++++++++++++++++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/check_layout.output b/check_layout.output index c4dfee1..b5938d3 100644 --- a/check_layout.output +++ b/check_layout.output @@ -7,12 +7,11 @@ Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ., : 1 warnings # res/xml/arab_pc_ir.xml Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], `, {, |, } -Layout doesn't define some important keys, missing: esc, f11_placeholder, f12_placeholder, tab +Layout doesn't define some important keys, missing: esc, tab 2 warnings # res/xml/arab_pc.xml Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, | -Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder -2 warnings +1 warnings # res/xml/beng_national.xml Layout includes some ASCII punctuation but not all, missing: $ Layout doesn't define some important keys, missing: f11_placeholder, f12_placeholder diff --git a/res/xml/arab_pc.xml b/res/xml/arab_pc.xml index 9fb9dad..66a8fbd 100644 --- a/res/xml/arab_pc.xml +++ b/res/xml/arab_pc.xml @@ -11,8 +11,8 @@ - - + + diff --git a/res/xml/arab_pc_ir.xml b/res/xml/arab_pc_ir.xml index d761cdb..01d1553 100644 --- a/res/xml/arab_pc_ir.xml +++ b/res/xml/arab_pc_ir.xml @@ -11,7 +11,7 @@ - + diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index 63c774b..7a75494 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -240,6 +240,7 @@ class KeyModifier case '§': return "¶"; case '†': return "‡"; case '×': return "∙"; + case ' ': return "nbsp"; // arrows case '↖': return "⇖"; case '↑': return "⇑"; @@ -356,8 +357,28 @@ class KeyModifier case 'ं': return "ॕ"; case '़': return "ॎ"; case 'ऽ': return "ॽ"; - // other - case ' ': return "nbsp"; + // Persian numbers + case '۱': return "f1"; + case '۲': return "f2"; + case '۳': return "f3"; + case '۴': return "f4"; + case '۵': return "f5"; + case '۶': return "f6"; + case '۷': return "f7"; + case '۸': return "f8"; + case '۹': return "f9"; + case '۰': return "f10"; + // Arabic numbers + case '١': return "f1"; + case '٢': return "f2"; + case '٣': return "f3"; + case '٤': return "f4"; + case '٥': return "f5"; + case '٦': return "f6"; + case '٧': return "f7"; + case '٨': return "f8"; + case '٩': return "f9"; + case '٠': return "f10"; default: return null; } }