|This article does not cite any sources. (November 2014)|
In computing, caret navigation is a kind of keyboard navigation where a caret (also known as a ‘text cursor’, ‘text insertion cursor’, or ‘text selection cursor’) is used to navigate within a text document. It is a fundamental feature for applications that deal with text, for example text editors (e.g., Notepad, Emacs and Vim), word processors (e.g., Microsoft Word, WordPerfect and WordStar), desktop publishing programs (e.g., PageMaker, Microsoft Publisher), and spreadsheets (e.g., Excel, Lotus 123).
This kind of navigation is also supported by some web browsers, such as Mozilla Firefox and Internet Explorer, where it is referred to as ‘caret browsing’. This can be contrasted with the alternate and more usual control methods of using a mouse to point to links and select text for copying or editing, or using tabs to step through and highlight each link on the page in turn. It is not, however, a universally supported control method; notably, Google Chrome does not (as of November 2012[update]) offer it as a built-in function.
In this text navigation mode the ‘cursor’ (often depicted as a blinking vertical line) appears within the text on-screen. The user can then navigate throughout the text by using the arrow navigation keys to cause the cursor to move; typically changing the cursor’s location in increments of character position horizontally and of text line vertically.
Once the cursor has been positioned as desired, any text typed will appear at the location of the cursor, either inserting the text and pushing any subsequent text further downwards, or overwriting any existing text (a mode of operation typically toggled by the Insert Key on most computer keyboards/systems).
The user can also perform various actions to manipulate the text, such as:
- selecting a block of text to e.g. change size/font or copy to the clipboard, by holding shift and pressing the arrow cursor or other navigation keys, which commonly extends a coloured or inverse-video highlight over the selected area
- inserting and deleting text and control characters at or from an arbitrary point, including cut and paste functions
- activating internet hyperlinks by pressing the Enter key whilst the caret is placed within them
Caret navigation usually also incorporates a form of viewport scrolling control where the caret moves freely within certain margins of a static display but triggers a scrolling event upon reaching one of the margins (either the edge of the screen/window/text field or a point a certain number of lines/characters within said edge).
The view within a WYSIWYG word processor, for example, may scroll the whole viewport a certain amount down the page as the caret nears the lower edge of the edit window. This keeps the text currently being entered or edited roughly centered without excessive, distracting, and potentially computationally expensive line-by-line scrolling.
A spreadsheet character-based word processor on a low-resolution screen may similarly scroll in all directions, character-by-character or line-by-line, maintaining a small margin which the caret never enters in order to show the user what text or cells lie directly ‘ahead’ of or ‘behind’ the edit point and prevent them from ‘working blind’.
A plain text text entry form, by contrast, may use a simpler method, setting a fixed and arbitrary display width within which the caret always ‘wraps around’, only scrolling up or down a line as the caret reaches the wrap point at the start/end of the current first/last line, in order to keep the edit point in view as it moves to the previous/next line of text. All other scrolling must be manually controlled by the user by use of scroll bars, mouse wheel, or Page Up/Page Down keys. Another alternate form of control is used in some spreadsheets when the Scroll Lock key is activated. In this case the caret is locked to the centre of the screen and the cursor keys instead move the worksheet itself ‘underneath’ the static caret, instead of the caret moving ‘over’ the sheet. The margins that trigger a scrolling action are effectively increased to their maximum possible size (vs the minimum possible with the web edit box), causing the caret to be re-centered any time it attempts to move.