Closed romdudk closed 6 months ago
Eagerly awaiting this. If there's anything I can do to help it get merged I'd love to.
By the way, MessagEase had a usability bug where ()[]{}<>
were not switched in Hebrew (unlike in PC RTL keyboard layouts) so you had to get used to type the opposite-looking ones. Would it be easy (in a future version, this should not delay merging) to switch them in RTL layouts?
I built it locally and I'm daily driving this on my Pixel 8 Pro, will update if there are any issues but for the last 5 minutes it seems fine.
By the way, MessagEase had a usability bug where ()[]{}<> were not switched in Hebrew (unlike in PC RTL keyboard layouts) so you had to get used to type the opposite-looking ones. Would it be easy (in a future version, this should not delay merging) to switch them in RTL layouts?
It would be helpful to know what RTL users expect here! I only speak LTR languages and generally move in circles that do the same, so I really have no idea about what's more comfortable for RTL users.
I guess in particular:
At least in Hebrew we use the comma as-is (so pointing away from the neighboring letter, not towards it like in English), same for question mark etc'.
The reason we need brackets switched is that the OS switches them for us, if you'll copy this to a hex editor you will see it's the same bracket character:
a(a א(א
(In fact if you copy it to an editable text field and erase the last character you will see the bracket suddenly flip!)
So since the same unicode character is displayed flipped when surrounded by Hebrew text, we need the opening bracket to be on the right (and ideally preceded by a unicode RTL marker so it's displayed flipped https://en.wikipedia.org/wiki/Right-to-left_mark).
This definitely needs to be a feature of the Hebrew layout and not how it is in Hebrew-configured devices. My device is English-configured. When I type English my brackets are not flipped so I want my keyboard to show them as they are, etc' etc'.
Another thing that would be nice, for the same reason, is to flip the direction of cursor movement by dragging on space. Currently when I scroll in Hebrew text moving my finger right scrolls left and vice-versa.
If you feel confused by all this and just want it done, I can sit down at some point and submit a PR for all of my requests (that adds an isRtl field to I guess the Layout
class and makes all these decisions based on its value?).
In summary, if (in RTL layouts) you render each Action preceded by the invisible unicode RTL mark \u2067
, you will immediately see visually the only wrong things (all brackets will face the wall instead of the center), so it will be very easy to know what to change in the symbols layout even if you don't speak any RTL language.
I've been using this for 5 days, it's as good as MessagEase's, I vote for merging right now (I'd still love to add the missing features I mentioned, but they were missing from MessagEase too, and I think they should be merged separately since they involve bigger changes to the codebase).
Agreed, I think it should be a separate issue, to fix RTL languages, as mentioned above perhaps by adding the IsRTL variable A temp fix could be to add these characters as part of the Hebrew keyboard, (meaning for example opening bracket with \u2067)but I assume appearance wise it wil make it look like the letters instead of like punctuation with the color scheme Anyways I don't think that fix should delay the merge
added hebrew layout similar to messageease layout