<div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>Examples</div><div>In a left-aligned paragraph, pressing the right arrow will move the cursor (|) like this:</div><div>|ab אבג cd</div><div><div>a|b אבג cd</div></div><div><div>ab| אבג cd</div></div><div><div>ab |אבג cd      OR     ab אבג| cd    (there is ambiguity because the space character can be both RTL or LTR)</div></div><div><div>ab א|בג cd</div></div><div>ab אב|ג cd<br></div><div><div>ab אבג| cd      OR     ab |אבג cd</div></div><div>ab אבג |cd<br></div><div>ab אבג c|d<br></div><div>ab אבג cd|<br></div><div><br></div><div>To help with navigation, the cursor has a line attached to its top showing which direction it's facing.</div><div><br></div><div>Hope this helps.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 12, 2023 at 3:42 AM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com">andy.goryachev@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-7902521841492541815">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_3524405820657259314WordSection1">
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">Hi.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">I have a question for people who routinely use right-to-left RTL languages (Arabic, Hebrew, etc.):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-family:"Iosevka Fixed SS16"">What is your expectation for navigating text using left/right arrow keys when the text contains a mixture of RTL and LTR?<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">It looks like there is no standard when it comes to modern applications – see a small sample:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><a href="https://gist.github.com/andy-goryachev-oracle/4802f9380fb03ec2be7ac36bd98a2059" target="_blank">https://gist.github.com/andy-goryachev-oracle/4802f9380fb03ec2be7ac36bd98a2059</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">In javafx, the navigation of bidirectional (bidi) text might have been broken sometime after jfx8, and even jfx8 might have issues, see<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><a href="https://bugs.openjdk.org/browse/JDK-8296266" target="_blank">https://bugs.openjdk.org/browse/JDK-8296266</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">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?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">Thank you<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Iosevka Fixed SS16"">-andy<u></u><u></u></span></p>
</div>
</div>

</div></blockquote></div>