This is a tricky one. All applications I have seen, and I think that's what people expect, is that the cursor changes direction during traversal.
A key point is where the paragraph is aligned to (in Windows adjusted with left CTRL+SHIFT and right CTRL+SHIFT). This sets the forward and backward direction: if the paragraph is left-aligned, pressing the right arrow moves the cursor forward, and for a right aligned, the right arrow moves the cursor backward. Then the actual movement of the cursor is relative to the paragraph alignment: in RTL alignment, traversing RTL text moves the cursor forward, while traversing LTR moves the cursor backward. Examples In a left-aligned paragraph, pressing the right arrow will move the cursor (|) like this: |ab אבג cd a|b אבג cd ab| אבג cd ab |אבג cd OR ab אבג| cd (there is ambiguity because the space character can be both RTL or LTR) ab א|בג cd ab אב|ג cd ab אבג| cd OR ab |אבג cd ab אבג |cd ab אבג c|d ab אבג cd| To help with navigation, the cursor has a line attached to its top showing which direction it's facing. Hope this helps. On Thu, Oct 12, 2023 at 3:42 AM Andy Goryachev <andy.goryac...@oracle.com> wrote: > Hi. > > > > I have a question for people who routinely use right-to-left RTL languages > (Arabic, Hebrew, etc.): > > > > *What is your expectation for navigating text using left/right arrow keys > when the text contains a mixture of RTL and LTR?* > > > > It looks like there is no standard when it comes to modern applications – > see a small sample: > > > https://gist.github.com/andy-goryachev-oracle/4802f9380fb03ec2be7ac36bd98a2059 > > > > In javafx, the navigation of bidirectional (bidi) text might have been > broken sometime after jfx8, and even jfx8 might have issues, see > > https://bugs.openjdk.org/browse/JDK-8296266 > > > > It looks like the most modern applications use logical navigation and > logical selection (that is, when navigating using left/right arrow keys, > the cursor position reflects previous/next insertion indexes in the text, > rather than visual position). This causes the cursor to change the > direction of movement when it crosses the bidi boundary. Would you say > this is the expected behavior? > > > > Thank you > > -andy >