Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

added hebrew layout #153

Merged
merged 1 commit into from
Apr 27, 2024
Merged

added hebrew layout #153

merged 1 commit into from
Apr 27, 2024

Conversation

romdudk
Copy link
Contributor

@romdudk romdudk commented Apr 14, 2024

added hebrew layout similar to messageease layout

@SonOfLilit
Copy link

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?

@SonOfLilit
Copy link

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.

@nightkr
Copy link
Owner

nightkr commented Apr 20, 2024

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:

  1. Do you want bracketing reversed? (You mentioned yes, but I'm also curious about hearing from others)
  2. Do you want all punctuation flipped, or only brackets?
  3. If you use both LTR and RTL layouts (I assume a hebrew layout isn't very helpful for writing in english, for example..), would you want it to switch depending on the current layout, or have a fixed setting for your system?

@SonOfLilit
Copy link

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?).

@SonOfLilit
Copy link

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.

@nightkr nightkr mentioned this pull request Apr 22, 2024
5 tasks
@SonOfLilit
Copy link

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).

@romdudk
Copy link
Contributor Author

romdudk commented Apr 27, 2024

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

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

Successfully merging this pull request may close these issues.

3 participants