Cursor key directions in RTL text?

In current builds of Bike (1.8.2, build 102 here at the moment)
left cursor keys (and derivatives like ⌥← etc) move leftward in LTR (e.g. Roman text) but rightward in RTL text (e.g. in text using the writing systems of the Levant, like Arabic and Hebrew).

This is consistent (← always moves closer to the start of a sentence, and → moves closer to its end) but it does feel counterintuitive when working with RTL, or mixed direction, text, and I still seem to keep tripping up, when I have to use left arrow keys to move right, and vice versa.

RTL scripts are probably a smallish minority case for Bike – and it’s not a high priority, but I wonder whether the architecture would permit the kind of behaviour that I’m used to in, for example, TextEdit, Mellel and MS Word, where

← and → always map to left and right

(rather than to towards start, and towards end of line)


I was wondering whether I could script that preference, intercepting ← and → in something like Keyboard Maestro, but I guess it would require scripting API for the character position of selections – at the moment we have row selections, but not, I think, cursor positions or text selection ranges.

FWIW a test file – an interlinear English outline translation of a poem by Amichai: (2.0 KB)

1 Like

I was wondering about that case. I knew I wasn’t matching macOS exactly, but I found inconsistent behavior across Safari, TextEdit, and Pages, so I just went with easiest approach with seemed to match Safari text area editing.

I think a scripting approach would expose to much surface area, and if you could solve with scripting approach satisfactorily, then better that I just do it in code.

Might take a few versions, but I’ll revisit this.

1 Like

That would great, at some point.

(One thing that may trip me is that while the arrow and opt-arrow keys do get inverted by RTL,
the ⌘→ and ⌘← apparently don’t)