In the case of Bidi input, where both RTL and LTR types languages can be mixed together, what should be the cursor position? And what should be the movement of the cursor with Home and End buttons?

At first, I thought that the cursor should always be placed where the next character is going to be placed. I mean for next e the cursor should be like (assuming | as the cursor)-


But in many places, it is like-


One advantage in the later approach is, when the language mode will be RTL again, the cursor position will be same. While in the first approach, it has jump to the left-most.

And should the behaviors of Home and End key change with RTL and LTR? Or should it remain same?

  • 1
    Hey, thats Farsi! UXSE Khosh omadeed, barodar!
    – jonshariat
    Commented Jun 1, 2011 at 16:01

1 Answer 1


I have always been of the opinion that there should be minimal jumping around in the text when moving the caret. It makes it so confusing to work with a mixture of RTL and LTR text.

This is the approach, even though it is not very standard, that I would take.

Start with the cursor at the beginning


If you press the right arrow key, move the caret right.


This makes it so that there is no jumping and the arrow keys behave sensibly. Even if I am reading from right to left, the left arrow should still move me left in the text and the right arrow should still move me right in the text. Selecting text should behave the same way.

If I add a new character, if I am in LTR mode it should append a character to the right of where the caret is and then move the caret right. If I am in RTL mode, it should append a character to the left of where the caret is and move the caret left.

If I press Enter, if the text on this line is aligned LTR, all the text to the right of the caret should be moved to the next line, and if it is aligned RTL, it the text left of the caret should be moved to the next line:

peacم //Enter is pressed

Enter is pressed\\ cسلام

If the line is in LTR mode, Home and End should go to the very left and to the very right of the line, respectively. In RTL mode, they should instead go to the very right and very left.

  • Having worked with farsi, a RTL language, I agree its very hard switching between a mixture of the two. However, when you are writing up large amounts of text its nice to have those little helps in the RTL way. Perhaps there could also be an on/off switch?
    – jonshariat
    Commented Jun 1, 2011 at 16:04
  • @jonshariat: I've often thought that a logical approach would be to require that at any given time the system be switched to RTL or LTR mode, and any text written in the other mode would essentially behave as uneditable picture elements until the mode was switched. Would that be overly cumbersome if there were a single keystroke to switch each way? It would certainly seem to simplify many design issues.
    – supercat
    Commented Sep 11, 2015 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.