I forgot to say something for the expected rendering of the RARE two-carets case, which will occur and should be needed ONLY when the insertion is between a strong-RTL and a strong-LTR character (I still suggest not using such pairs of carets if one of them is just a weak SPACE) :
2012/11/12 Philippe Verdy <[email protected]> > * If the text encoded in logical order as "ARABIC1234", and displayed as > "CIBARA1234", where the insertion point is between "C" and "1": > ^CIBARA_1234 > where "^" and "_" are the two carets. > In this case, the two carets won't need to be distinct visually, they could be rendered with the same "vertical" lines as well (only the simply presence of two carets is enough). But: * one of them (^) is a LEFT-SIDE INSERTION CARET, and if a direction is indicated by an arrowhead, it should point to the left. * the other one (_)" is a RIGHT-SIDE INSERTION CARET, and if a direction is indicated by an arrowhead, it should point to the right. Even in this case, you don't need to show "half-form" carets : these forms are just an alternate rendering of standard (oriented) full carets, and even these alternate "half-form" carets could be used for the most frequent cases where a single caret position is rendered. Even in this case, what will happen when you'll press a key or perform an edit action is clear : * with the DELETE key (or a CUT action), you'll delete the character visually AFTER this insertion point (so you'll delete the digit "1". and there will still be two carets for the new position between "C" and "2" in "ARABIC234" rendered as: ^CIBARA_234 * with the BACKSPACE key, you'll delete the character visually DEFORE this insertion point (so you'll delete the letter C. and there will still be two carets for the new position between "I" and "2" in "ARABI1234", rendered as ^IBARA_1234 * when typing a digit 0, you'll insert it at the location point and reposition it after the 0, generating "ABARIC01234", rendered as: ^CIBARA_01234 * when typing an Arabic letter S, you'll insert it at the location point and reposition it after the S, generating "ABARICS1234", rendered as: ^SCIBARA_1234 * when pressing ENTER to split the paragraph, you'll insert it at the location point and reposition it after the newline, generating "ABARIC\n1234", rendered this time with a single caret (still possibly oriented with an arrowhead to the left if the digit 1 is Perso-Arabic, or to the right if it's a strong LTR digit) as: CIBARA |1234 The ambiguous keys however are the movement keys (LEFT and RIGHT arrows) : they should move in the direction of the arrow.

