keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
390 stars 108 forks source link

bug(windows): RTL switches to LTR when punctuation key entered #9874

Closed rc-swag closed 11 months ago

rc-swag commented 11 months ago

Describe the bug

Raised in the Community forum here. When typing with an RTL such as Yiddish or Urdu Phonetic when a punctuation key is entered, for example, a double quote ". The double quote is placed on the far right of the current line, and the cursor is also moved to this position. As soon as another non-punctuation key is pressed, both the double quote and the cursor are moved to the far left, that is to the correct position. However, if an Return key is pressed the double quote will stay in the incorrect insertion point on the right.

This is observed in Notepad and LibreOffice on Windows 10. However, it works fine in Word, WordPad, and Firefox. This suggests it is a problem only in not TSF apps.

Update: I just discovered even space is initially inserted on the right until the next key press then the space plus the next character and cursor return to the left. While it works out ok it is distracting to the user.

Reproduce the bug

No response

Expected behavior

No response

Related issues

No response

Keyman apps

Keyman version

17.0.197

Operating system

Windows 10

Device

No response

Target application

No response

Browser

No response

Keyboard name

Yiddish Pasekh, Urdu Phonetic

Keyboard version

1.9,1.21

Language name

RTL (hebrew), Urdu

Additional context

No response

mcdurdin commented 11 months ago

This seems like it relates to display rather than input?

rc-swag commented 11 months ago

This seems like it relates to display rather than input?

Display or the editor itself? A " followed by Return will result in the double quote remaining on the right. If it is an issue with the editor. Then we would either have to raise a bug with them OR. Do something hacky like sending a dummy character (for RTL languages for certain code points) and deleting it so the editor fixed itself

rc-swag commented 11 months ago

The display problem is that the text area or paragraph section is set as LTR instead of RTL. By correcting the setting in Notepad , LibreOffice and Word the punctuation behaves correctly. It is also worth checking the correct language is registered for the keyboard in the Keyman Configuration. I have put more detail on how to change this setting in the original forum post.