Skip to main content
1 of 3
Pesikar
  • 1k
  • 1
  • 10
  • 24

Apple used to solve this in Carbon (on page 34) in two ways:

###1. Use a double cursor When you are on a space between the LTR and RTL parts of the text and you type LTR characters, it will appended to the LTR part of the text, when you type RTL characters you will append it to the RTL part. Caret position in a bidi string

The cursor is positioned at the end of the Arabic text and the beginning of the Roman text, so when you would want to visualize this with a cursor you get the following image:

Primary and secondary cursors

In this example the primary caret is based on the primary line direction and the secondary based on the line direction on the Roman text. You could also base the primary caret on the current input type, as seen on the top bar with the flag to indicate the input is currently set to Roman text. ###2. Show only the primary cursor The document makes clear that a single cursor is simpler: Single cursor based on input method

When the input method is changed to Roman then the cursor appears at the spot Roman characters would appear, and when it is changed to Arabic for example, the cursor is moved to the spot where Arabic characters would be inserted.

The solution would depend on your users, would they like to know both spaces where characters could be inserted and are they able to grasp the dual cursors you could go for the first option. When an input method is changed to insert characters the second option appears simpler to the user.

Pesikar
  • 1k
  • 1
  • 10
  • 24