Is there a specification for OS-default mouse and keyboard text navigation and selection behavior?

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. 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.