public enum EditingCommandWhat a chord means to a text control, independently of which chord it was.
Remarks
The vocabulary, not the keys. AppKit calls these selectors and routes them through doCommandBySelector:; this is the same idea with no reflection in it (ADR-002). Two controls answering the same verb is what stops a text box and a code editor from drifting into two different keyboards, which is exactly what they had done.
⚠ Shift is not in here. Extending the selection is orthogonal to every motion — MoveWordLeft with Shift held is the same verb against a different anchor — so doubling the enum would double every table and every switch to say one bit. A control reads Shift off the event.
⚠ And nothing is in here that neither control answers. transpose and yank are real AppKit verbs and are deliberately absent: an id in a table that no control implements is a menu entry that greys out forever, which is this codebase's commonest defect wearing a keyboard.
Fields and properties (30)
NoneThe chord means nothing to a text control; leave it for whatever else was listening.
MoveLeftOne grapheme left.
MoveRightOne grapheme right.
MoveUpOne line up.
MoveDownOne line down.
MoveWordLeftTo the previous word boundary.
MoveWordRightTo the next word boundary.
MoveLineStartTo the start of the line.
MoveLineEndTo the end of the line.
MovePageUpA screenful up.
MovePageDownA screenful down.
MoveDocumentStartTo the very beginning.
MoveDocumentEndTo the very end.
DeleteBackwardBackspace.
DeleteForwardDelete.
DeleteWordBackwardBack to the previous word boundary.
DeleteWordForwardForward to the next word boundary.
DeleteToLineStartBack to the start of the line.
DeleteToLineEndForward to the end of the line — AppKit's ⌃K, without the kill ring.
InsertNewlineA line break.
InsertTabA tab, or an indent of the selected lines — with Shift, an outdent.
SelectAllSelect everything.
CutCut.
CopyCopy.
PastePaste.
SubmitAccept the field's value — a form's default action, not a line break.
ShowCompletionAsk for completions at the caret.
CancelDismiss whatever is open.
UndoTake back the last edit, if the control can find somewhere that recorded it.
RedoPut it back.
Used by (4)
- CodeEditorVixen.Ui.Controls.Advanced
- EditingCommandsVixen.Ui
- EditingCommandsTestsVixen.Ui.Tests
- TextFieldVixen.Ui.Controls