dessalines / thumb-key

A privacy-conscious Android keyboard made for your thumbs
GNU Affero General Public License v3.0
997 stars 209 forks source link

Auto capitalization in Hebrew layouts causes words to start with the final form of letters #953

Closed ayaOwO closed 3 months ago

ayaOwO commented 3 months ago

Steps to reproduce

  1. Open whatsapp
  2. Enter a chat
  3. Type a hebrew letter which has a final form Alternative steps:
  4. Type a dot
  5. Type a space
  6. Type a letter which has a final form

Expected behavior

The letter should be a regular letter. For example כ

Actual behavior

The letter is in its final form. For example ך

version of the program

3.2.4

Android version

one ui 6.1 android 14

Device

s24+

Other details

I believe this may have to do with #944

Acknowledgements

avishayshay commented 3 months ago

Yea this is very annoying. please fix this. There is no capitalization in Hebrew.

dessalines commented 3 months ago

PRs welcome. I don't speak Hebrews, so I'll re-open should someone want to work on this.

Raven-002 commented 3 months ago

After viewing the code, it seems as if there is no simple fix for it.

What cause the issue

The issue is that this feature (#944) is done as a hack, which causes the unwanted behavior.

It defines the final versions of letters the same way capital letters are defined.

What is a final letter?

For context: final letters are used only in end of words, unlike capital letters, which have a lot of use cases, and most notably capital first letter of a sentence.

possible fix

In order to fix the issue with the autocorrect, we will need to make it language dependent. From my quick look, it will require refactoring some code.

My suggestion

I suggest reverting the merge as it breaks the layout. In Hebrew, we are already used to the final letters being separate keys and not a shifted version, especially since most letters don't have one. The behavior introduced in the merge is unexpected and causes an unwanted behavior consistently, requiring the user to disable autocorrect globally.

If the feature is something anyone still wants, they can reopen the merge request and fix this issue, making sure it does not break the layout.

dessalines commented 3 months ago

Gotcha, I'll revert that PR then now.

yehoshuapw commented 3 months ago

sorry, I missed that. (I don't use the capitalization at all, so didn't think of it - and didn't catch it when doing a quick testing) I agree that given that, it is better for now not to have the feature (that many people don't seem to want (it did exist in MessagEase)) then to break the global auto capitalization. I'll perhaps try to do this in a better manner, but that will take time.