Vixen
dd8b0a81
csharp
public enum EditingCommand

What a chord means to a text control, independently of which chord it was.

Read the guide page for this →

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)

  • None

    The chord means nothing to a text control; leave it for whatever else was listening.

  • MoveLeft

    One grapheme left.

  • MoveRight

    One grapheme right.

  • MoveUp

    One line up.

  • MoveDown

    One line down.

  • MoveWordLeft

    To the previous word boundary.

  • MoveWordRight

    To the next word boundary.

  • MoveLineStart

    To the start of the line.

  • MoveLineEnd

    To the end of the line.

  • MovePageUp

    A screenful up.

  • MovePageDown

    A screenful down.

  • MoveDocumentStart

    To the very beginning.

  • MoveDocumentEnd

    To the very end.

  • DeleteBackward

    Backspace.

  • DeleteForward

    Delete.

  • DeleteWordBackward

    Back to the previous word boundary.

  • DeleteWordForward

    Forward to the next word boundary.

  • DeleteToLineStart

    Back to the start of the line.

  • DeleteToLineEnd

    Forward to the end of the line — AppKit's ⌃K, without the kill ring.

  • InsertNewline

    A line break.

  • InsertTab

    A tab, or an indent of the selected lines — with Shift, an outdent.

  • SelectAll

    Select everything.

  • Cut

    Cut.

  • Copy

    Copy.

  • Paste

    Paste.

  • Submit

    Accept the field's value — a form's default action, not a line break.

  • ShowCompletion

    Ask for completions at the caret.

  • Cancel

    Dismiss whatever is open.

  • Undo

    Take back the last edit, if the control can find somewhere that recorded it.

  • Redo

    Put it back.

Used by (4)

  • CodeEditorVixen.Ui.Controls.Advanced
  • EditingCommandsVixen.Ui
  • EditingCommandsTestsVixen.Ui.Tests
  • TextFieldVixen.Ui.Controls