Graphical Text Editors
Aqua’s default text view, found in nearly every Cocoa application that involves text entry, is laden with a wide and predictable range of features. For a core OS service, the standard Aqua textbox gives you some fairly sophisticated editing tools.
First of all, there’s a myriad of undocumented keystrokes you can use to quickly move your cursor around, besides the obvious use of the arrow keys, or the even more obvious (and time-consuming) use of the mouse. These have been variously cribbed from Microsoft Word, NeXTSTEP, and even the Emacs text editor. (In this table, a “line” means a single row of text as it appears in the window, and a “paragraph” means any number of rows, bound on either end by either a hard carriage return or the start or end of the text area.)
|
Key command |
Action |
|---|---|
|
- ← Control- ← |
Move the cursor to the beginning of the line. |
|
- →, Control- → |
Move the cursor to the end of the line. |
|
Control-A |
Move the cursor to the start of the paragraph. |
|
Control-E |
Move the cursor to the end of the paragraph. |
|
Option-↑ |
Move the cursor up one paragraph. |
|
Option-↓ |
Move the cursor down one paragraph. |
|
Option- → |
Move the cursor right one word. |
|
Option- ← |
Move the cursor left one word. |
|
Control-D |
Delete the character to the right of the cursor. ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access