On macOS, when editing a Right-to-Left (RTL) field in Anki, Command + Left/Right Arrow does not move the cursor to the start or end of the line as expected. This breaks standard macOS text navigation and affects usability with RTL languages.
Steps to Reproduce:
1. Open Anki on macOS
2. Edit or create a note with an RTL field
3. Click into the RTL field
4. Press Command + Left Arrow or Command + Right Arrow
Expected Behavior:
The cursor jumps to the start/end of the line, matching macOS behavior.
Actual Behavior:
The cursor does not jump to the start of the line as shown in the gif.
Additional Info:
• Anki Version: Version 25.02 (038d85b1) Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
• macOS Version: macOS Sequoia 15.4
• Works correctly in LTR fields
• Tested in safe mode with no add-ons
I can reproduce this in
Anki 24.11 (87ccd24e) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-13.7.4-x86_64-i386-64bit
Also to be noted, if I move my cursor all the way to the “left” (as in right of the text visible, but left from input standpoint), then it goes back to the left most point, yet input is still at the rightmost. On one character before the “left”-end point, the cursor is visible in the correct position. Alt + Arrow also does not work.
I am not completely familiar with RTL languages, but it seems as though characters like “?”, “!” and the like seem to break this. If I have the following string “t!!h!!!isi???th ???” in RTL, using left arrowkey moves to the left for the last sequence of “?” but moves to the right for all others.