Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose and FN Combo Requests for Arabic-derived alphabets #769

Open
anaskaejdar opened this issue Sep 27, 2024 · 10 comments · May be fixed by #807
Open

Compose and FN Combo Requests for Arabic-derived alphabets #769

anaskaejdar opened this issue Sep 27, 2024 · 10 comments · May be fixed by #807

Comments

@anaskaejdar
Copy link
Contributor

anaskaejdar commented Sep 27, 2024

There are hardly any compose combos or FN alternates yet set up for the
arabic-based letters, so I thought I'd put together some. I think this is a
strong start, but we'll probably want to add more to this list at some point.
But basically, I considered the alphabets for Arabic, Persian, Kurdish, and
Urdu, and the goal was to create combinations that would allow someone with just
one of those language's keyboards to type the letters which are present in the
other languages but absent in their own, and to type them without having to
enable an additional keyboard.

Input (with Fn active) Output
ل ڵ
ُ ۆ
ِ ێ
ر ڕ
ب ٮ
ه ھ
ث پ
ز ژ
غ گ
ك ک
ا آ
ي ی
ک ك
ط ظ
ص ض
ی ي
ق غ
ع ء
ح ہ
ێ ِ
ئ ٔ
ؽ ٛ
ۉ ٛ
ڡ ُ
ة َ
إ ٕ
ۆ ٚ
ێ ٚ
س ـ
ف ڤ
ن ں
[space] zwnj (the letter called “halfspace” in UnexpectedKeyboard)
First Input (after pressing Compose) Second Input Output
ل ۷ ڵ
۷ ل ڵ
۷ ر ڕ
ر ۷ ڕ
ف و ڡ
و ف ڡ
ه و ۆ
و ۷ ۆ
۷ و ۆ
ه ی ێ
ه ي ێ
۷ ی ێ
ی ۷ ێ
۷ ي ێ
ي ۷ ێ
ق و ۊ
ا ی ؽ
ا ي ؽ
ی ۸ ؽ
۸ ی ؽ
ي ۸ ؽ
۸ ي ؽ
و ۸ ۉ
۸ و ۉ
ا و ۉ
و ۸ ۉ
۸ و ۉ
ه [space] ە
ه ع ۀ
ع ه ۀ
ج ش چ
غ ک گ
غ ك گ
ت د ط
س ش ص
د ز ذ
ی ا ى
ي ا ى
ه ت ة
ع ی ئ
ع ي ئ
ی ع ئ
ي ع ئ
ع و ؤ
و ع ؤ
ش ت ث
ت ش ث
ع ا إ
ا ع أ
ی [space] ے
۷ ۷ arabic_combining_v
۸ ۸ arabic_combining_inverted_v
ل ل arabic_combining_shaddah
ح ح arabic_combining_sukun
ه ه arabic_combining_fatha
و و arabic_combining_dammah
ی ی arabic_combining_kasra
ي ي arabic_combining_kasra
ع ۸ arabic_combining_hamza_above
۸ ع arabic_combining_hamza_above
ع ۷ arabic_combining_hamza_below
۷ ع arabic_combining_hamza_below
ا ا arabic_combining_alef_above
ا ۷ arabic_combining_alef_below
۷ ا arabic_combining_alef_below
ه ن arabic_combining_fathatan
ی ن arabic_combining_kasratan
و ن arabic_combining_dammatan
ن ه arabic_combining_fathatan
ن ی arabic_combining_kasratan
ن و arabic_combining_dammatan
و ث ۋ
ن ت ٹ
ت ن ٹ
د ت ڈ
ت ر ڑ
ر ت ڑ
Diacritic names combining character graphemica link glyph
arabic_combining_v ٚ https://graphemica.com/065A combining_v
arabic_combining_inverted_v ٛ https://graphemica.com/065B combining_inverted_v
arabic_combining_shaddah ّ https://graphemica.com/0651 combining_shaddah
arabic_combining_sukun ْ https://graphemica.com/0652 combining_sukun
arabic_combining_fatha َ https://graphemica.com/064E combining_fatha
arabic_combining_dammah ُ https://graphemica.com/064F combining_dammah
arabic_combining_kasra ِ https://graphemica.com/0650 combining_kasra
arabic_combining_hamza_above ٔ https://graphemica.com/0654 combining_hamza_above
arabic_combining_hamza_below ٕ https://graphemica.com/0655 combining_hamza_below
arabic_combining_alef_above ٰ https://graphemica.com/0670 combining_alef_above
arabic_combining_fathatan ً https://graphemica.com/064B combining_fathatan
arabic_combining_kasratan ٍ https://graphemica.com/064D combining_kasratan
arabic_combining_dammatan ٌ https://graphemica.com/064C combining_dammatan
@anaskaejdar
Copy link
Contributor Author

anaskaejdar commented Oct 4, 2024

The glyphs have been made, @Julow ! Except there's a couple things to know about them: Firstly, I had to change the font for those, because Roboto had improper shapes and even missing shapes for some of them. I used Noto Naskh Arabic. Secondly, these glyphs feel cramped. How important is it that I keep the symbol within bounds? Would it be okay to scale down the half-circle to make more room for the diacritic?

@anaskaejdar
Copy link
Contributor Author

Here's the same table with less cramped versions of the glyphs, assuming that it's okay for the shapes to poke through the ceiling like this. When I was working on combining forms of the existing glyphs, I noticed that some of them poked through the ceiling a bit, so I thought that might be fine. If it is fine, let's try these:

Diacritic names combining character graphemica link glyph
arabic_combining_v ٚ https://graphemica.com/065A combining_v
arabic_combining_inverted_v ٛ https://graphemica.com/065B combining_inverted_v
arabic_combining_shaddah ّ https://graphemica.com/0651 combining_shaddah
arabic_combining_sukun ْ https://graphemica.com/0652 combining_sukun
arabic_combining_fatha َ https://graphemica.com/064E combining_fatha
arabic_combining_dammah ُ https://graphemica.com/064F combining_dammah
arabic_combining_kasra ِ https://graphemica.com/0650 combining_kasra
arabic_combining_hamza_above ٔ https://graphemica.com/0654 combining_hamza_above
arabic_combining_hamza_below ٕ https://graphemica.com/0655 combining_hamza_below
arabic_combining_alef_above ٰ https://graphemica.com/0670 combining_alef_above
arabic_combining_fathatan ً https://graphemica.com/064B combining_fathatan
arabic_combining_kasratan ٍ https://graphemica.com/064D combining_kasratan
arabic_combining_dammatan ٌ https://graphemica.com/064C combining_dammatan

@anaskaejdar
Copy link
Contributor Author

Here's the same table once again, but this time I shrank the half-circle thing to make more room.

Diacritic names combining character graphemica link glyph
arabic_combining_v ٚ https://graphemica.com/065A combining_v
arabic_combining_inverted_v ٛ https://graphemica.com/065B combining_inverted_v
arabic_combining_shaddah ّ https://graphemica.com/0651 combining_shaddah
arabic_combining_sukun ْ https://graphemica.com/0652 combining_sukun
arabic_combining_fatha َ https://graphemica.com/064E combining_fatha
arabic_combining_dammah ُ https://graphemica.com/064F combining_dammah
arabic_combining_kasra ِ https://graphemica.com/0650 combining_kasra
arabic_combining_hamza_above ٔ https://graphemica.com/0654 combining_hamza_above
arabic_combining_hamza_below ٕ https://graphemica.com/0655 combining_hamza_below
arabic_combining_alef_above ٰ https://graphemica.com/0670 combining_alef_above
arabic_combining_fathatan ً https://graphemica.com/064B combining_fathatan
arabic_combining_kasratan ٍ https://graphemica.com/064D combining_kasratan
arabic_combining_dammatan ٌ https://graphemica.com/064C combining_dammatan

@anaskaejdar
Copy link
Contributor Author

I added another symbol: the small-alef diacritic which goes below the letter rather than above.

---- ---- ----- -----
arabic_combining_alef_below ٖ https://graphemica.com/0656 combining_alef_below

@Julow Julow linked a pull request Nov 23, 2024 that will close this issue
@Julow
Copy link
Owner

Julow commented Nov 23, 2024

Sorry for the slow reply. I've added all of that in #807.
Can you have a look at it and check whether everything works fine ? The debug build is at the end of this page.

@Julow
Copy link
Owner

Julow commented Nov 23, 2024

The only problem is zwnj, which cannot be bound to Fn+space as that's already taken for nbsp. Do you have an other place to put it ?

@anaskaejdar
Copy link
Contributor Author

Wow, Jules! I'll keep toying with it, but my initial impression is just… Chef's kiss, my friend🤩! This is incredible. It's so powerful, without being cluttered

@anaskaejdar
Copy link
Contributor Author

As for Fn+space, I apologize for that oversight. It could just go on Fn+: in that case. Or alternatively, Fn+، which is just the arabic version of the comma.

@anaskaejdar
Copy link
Contributor Author

anaskaejdar commented Nov 23, 2024

Ok I've toyed some and found a couple of things. So I didn't realize, but the persian numbers, ۷ and ۸, are different codepoints than the arabic counterparts, ٧ and ٨ even though they pretty much look identical. So for keyboard layouts that use the arabic versions of the numbers, let's add the following which are essentially duplicated from what we have already, but with the persian codepoint swapped for the arabic one:

First Input (after pressing Compose) Second Input Output
ل ٧ ڵ
٧ ل ڵ
٧ ر ڕ
ر ٧ ڕ
و ٧ ۆ
٧ و ۆ
٧ ی ێ
ی ٧ ێ
٧ ي ێ
ي ٧ ێ
ی ٨ ؽ
٨ ی ؽ
ي ٨ ؽ
٨ ي ؽ
و ٨ ۉ
٨ و ۉ
و ٨ ۉ
٨ و ۉ
٧ ٧ arabic_combining_v
٨ ٨ arabic_combining_inverted_v
ع ٨ arabic_combining_hamza_above
٨ ع arabic_combining_hamza_above
ع ٧ arabic_combining_hamza_below
٧ ع arabic_combining_hamza_below
ا ٧ arabic_combining_alef_below
٧ ا arabic_combining_alef_below

Then, since arabic and persian have slightly different versions of the same letter— ي and ی, respectively — I tried to make sure each combination that used this letter was duplicated so that it would work with either version of the letter. With the following three, I didn't realize I neglected to do this, so let's also add:

First Input (after pressing Compose) Second Input Output
ي ن arabic_combining_kasratan
ن ي arabic_combining_kasratan
ي [space] ے

And then, with the FN variants, I noticed this discrepancy in behaviour. The OP table had these:

Input (with Fn active) Output
arabic_combining_kasra ێ
ێ arabic_combining_kasra

whereas in this build it behaves rather like this:

Input (with Fn active) Output
arabic_combining_kasra it just stays as kasra
arabic_combining_fatha (wrong diacritic. I take responsibility for the mistake, because I just left the glyphs there in the FN table instead of putting in their names. Forgive me) ێ
ێ arabic_combining_v (v instead of kasra)

@Julow
Copy link
Owner

Julow commented Nov 23, 2024

Thanks for taking a look! I have done the fixes you listed, here's the new debug build: https://github.com/Julow/Unexpected-Keyboard/actions/runs/11990917674?pr=807

As for Fn+space, I apologize for that oversight. It could just go on Fn+: in that case. Or alternatively, Fn+، which is just the arabic version of the comma.

I went for Fn+: because : is currently present on more arabic layouts than ،. But I feel that the placement is not right.
It's also possible to set Fn+space for arabic layouts only, by adding a custom <modmap> into every arabic layouts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants