To map from the current insertion point to the next, use either GetNextInsertionPoint or GetPreviousInsertionPoint. For Latin-based languages, the next insertion point is the next point to the right, and the previous insertion point is the next point to the left.
If the current text selection is a range of text, use GetRightInsertionPoint and GetLeftInsertionPoint to handle cursor key events. These functions take the currently selected text range and return the new TInsertionOffset.
TTextLineLayout also provides functions that you should use when a cursor key needs to move to the beginning or end of a line. These special functions are provided because the visually rightmost or leftmost character is not always the first or last character on the line. To retrieve the insertion point at the beginning or end of the line, use the functions GetLeftmostInsertionPoint and GetRightmostInsertionPoint.