On desktop platforms, each OS has a (relatively similar) set of behavior for text input navigation and selection. Some simple things include moving the cursor left, right, up, and down when tapping the arrow keys. Holding Ctrl (on Windows) jumps one word at a time, and holding Shiftcauses the selection to be highlighted.

But there are many intricate and subtle details about this behavior. For example, selecting text with the cursor creates a selection where Shift and arrow keys will expand or contract the selection from the side it was released from the cursor. Home and End jump to the start and end of a single line, while CtrlHome/End jumps to the top or bottom of the entire text region. CtrlShiftBackspace/Delete deletes from the cursor to the start/end of the line. Navigating text with arrow keys from a line of a certain length also remembers the length of the line when moving to other lines that are a shorter length, so a subsequent line of text lets the cursor return to that distance to the right of the line start. Jumping vertically between lines is also measured based on pixel width, not character counts.

Getting more into the weeds, this could also include the behavior between text entry fields like the usage of the Tab and ShiftTab keys to switch between text boxes, Space to activate a highlighted input element, and so on. Such input navigation behavior not directly pertaining to text boxes would be a bonus for the scope of this question, but I am primarily focused on text entry.

In order to reimplement all of these features in a built-from-scratch desktop application that does not use OS-provided GUI APIs, I am looking for a complete specification that describes all of this behavior related to text navigation and selection using mouse and keyboard (and, as a bonus, touch or other input methods). In order to maintain consistency for users of each operating system, I would ideally like to find something from each OS vendor or from a source that mentions the distinctions (for example, macOS uses the Option instead of Ctrl for jumping word-by-word), and there are surely more distinctions. The more complete this specification is, the better.

  • At one point both Windows and Apple had interface specifications online. However these might not be detailed enough to answer your question.
    – PhillipW
    Jun 4, 2020 at 13:20

1 Answer 1


There are more things than you might suggest. Besides different OSes there are different locales in each of them, and weird stuff is going on there (different keys for different purposes, right-to-left typing, letters being combined into clusters as in Korean, no spaces to jump between the words (Japanese, Chinese) but some logical word-splitting instead). Also there are accessibility features like voice editing. Also this stuff may change from version to version.

My point is: OS knows it better. You will always be two steps behind and partly incompatible, sorry.

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.