macOS: ⌘+← and ⌘+→ do not behave correctly with respect to RTL lines

Steps to reproduce

  1. Enable “Right-to-left” in Editor settings.
  2. Create a new file and enter text in a RTL language such as Hebrew, Arabic, etc.
  3. Navigate through the RTL text using the right/left arrow keys - works as expected.
  4. Hit ⌘+→ (right) to return to the line beginning (like “Home” key) - works as expected.
  5. Hit ⌘+← (right) to return to the line beginning (like “End” key) - does not work as expected (cursor returns to line beginning instead of line end)

Remarks:

  • If the text is in English (or other LTR language), the behavior is correct (even in Editor is set to RTL).
  • End key works as expected (when a full keyboard is used).

Did you follow the troubleshooting guide? Y (sandbox vault, community plugins turned off, no CSS snippets installed)

Expected result

  • ⌘+→ should behave like the Home key - works.
  • ⌘+← should behave like the End key - does not work.

Actual result

Cursor goes to line beginning instead of line end when hitting ⌘+←.

Environment

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.4.13
Operating system: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 23.4.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

1 Like

thanks we’ll look in to it

1 Like

@WhiteNoise, seems like the behavior in 1.6.x changed:

  • ⌘+→ takes the cursor to the end of the line (instead of beginning).
  • ⌘+← takes the cursor to the beginning of the line (instead of end).

Regardless of that, kudos for the massive improvement in RTL support!!

1 Like

This bug is still not fixed.

  • when hitting Command (⌘) + Left, the typing cursor goes right to the start of line while it should go left to the end of line for RTL languages
  • when hitting Command (⌘) + Right, the typing cursor goes left to the end of line while it should go right to the start of line for RTL languages

SYSTEM INFO:
Obsidian version: v1.7.4
Installer version: v1.6.7
Operating system: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 23.6.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

I am looking again at this bug report.
Given that the hotkeys are tied to directional arrow keys, would it make sense that regardless of RTL or LTR they move the cursor in the direction of the arrow?

What do they now?
How does an apple native app behaves?

Yes, the cursor should move to the direction of the arrow, regardless of the language set.
this is how it behaves in a native app