Enum Command
Actions which can be performed by a View.
public enum Command
- Extension Methods
Fields
Accept = 1Accepts the current state of the View (e.g. list selection, button press, checkbox state, etc.).
The default implementation in View raises the Accepting and Accepting events.
Activate = 3Activates the View or an item in the View, changing its state or preparing it for interaction (e.g. toggling a checkbox, selecting a list item, focusing a button, navigating a menu item) without necessarily accepting it.
The default implementation in View raises the Activating event. If Activating is not handled, SetFocus() will be called and the Activated event will be raised.
Arrange = 69Enables arrange mode.
Cancel = 75Cancels an action or any temporary states on the control e.g. expanding a combo list.
Center = 85Centers the current item or viewport.
Collapse = 73Collapses a list or item (with subitems).
CollapseAll = 74Recursively collapses a list items of their children (if any).
Context = 83Shows context about the item (e.g. a context menu).
Copy = 60Copies the current selection.
Cut = 61Cuts the current selection.
CutToEndOfLine = 63Cuts to the clipboard the characters from the current position to the end of the line.
CutToStartOfLine = 64Cuts to the clipboard the characters from the current position to the start of the line.
DeleteAll = 43Deletes all objects.
DeleteCharLeft = 41Deletes the character on the left.
DeleteCharRight = 40Deletes the character on the right.
DisableOverwrite = 39Disables overwrite mode (EnableOverwrite)
Down = 5Moves down one item (cell, line, etc...).
DownExtend = 22Extends the selection down one (cell, line, etc...).
Edit = 84Invokes a user interface for editing or configuring something.
EnableOverwrite = 37Enables overwrite mode such that newly typed text overwrites the text that is already there (typically associated with the Insert key).
End = 16Moves to the end (e.g. the bottom).
EndExtend = 30Extends the selection to end (e.g. bottom).
EndOfPage = 13Moves to the bottom of page.
Expand = 71Expands a list or item (with subitems).
ExpandAll = 72Recursively Expands all child items and their child items (if any).
Find = 48Opens or activates a find/search UI.
FindNext = 49Finds the next match.
FindPrevious = 50Finds the previous match.
Home = 15Moves or resets to the home position.
HotKey = 2Performs a hot key action (e.g. setting focus, accepting, and/or moving focus to the next View).
The default implementation in View raises the HandlingHotKey event and if that is not handled, invokes Activate.
Insert = 38Inserts a character.
InsertCaretAbove = 88Adds an additional caret one line above the topmost caret (multi-caret editing), preserving the sticky visual column. Mirrors VS Code's
editor.action.insertCursorAbove. Views that support multi-caret bind this through KeyBindings or their configurable default key bindings.InsertCaretBelow = 89Adds an additional caret one line below the bottommost caret (multi-caret editing), preserving the sticky visual column. Mirrors VS Code's
editor.action.insertCursorBelow. Views that support multi-caret bind this through KeyBindings or their configurable default key bindings.InsertTab = 46Inserts a tab character or spaces at the cursor or selection.
KillWordLeft = 35Deletes the word to left to the cursor.
KillWordRight = 34Deletes the word to the right of the cursor.
Left = 6Moves left one (cell, line, etc...).
LeftExtend = 23Extends the selection left one item (cell, line, etc...)
LeftStart = 17Moves left to the start on the current row/line.
LeftStartExtend = 31Extends the selection to the start on the current row/line.
LineDownToLastBranch = 52Moves down to the last child node of the branch that holds the current selection.
LineUpToFirstBranch = 53Moves up to the first child node of the branch that holds the current selection.
New = 82Creates a new document.
NewLine = 44Inserts a new item.
NextTabGroup = 67Moves focus to the next TabGroup.
NextTabStop = 65Moves focus to the next TabStop.
NotBound = 0Indicates the command is not bound or invalid. Will call RaiseCommandNotBound(ICommandContext?).
Open = 79Open the selected item or invoke a UI for opening something.
PageDown = 9Move one page down.
PageDownExtend = 27Move one page down extending the selection to cover revealed objects/characters.
PageLeft = 10Moves to the left page.
PageRight = 11Moves to the right page.
PageUp = 8Move one page up.
PageUpExtend = 28Move one page up extending the selection to cover revealed objects/characters.
Paste = 62Pastes the current selection.
PreviousTabGroup = 68Moves focus to the nextTabGroup.
PreviousTabStop = 66Moves focus to the previous TabStop.
Quit = 76Quit.
Redo = 59Redo changes.
Refresh = 77Refresh.
Replace = 51Opens or activates a find-and-replace UI.
Right = 7Moves right one (cell, line, etc...).
RightEnd = 18Moves right to the end on the current row/line.
RightEndExtend = 32Extends the selection to the right on the current row/line.
RightExtend = 24Extends the selection right one item (cell, line, etc...)
Save = 80Saves the current document.
SaveAs = 81Saves the current document with a new name.
ScrollDown = 54Scrolls down one (cell, line, etc...).
ScrollLeft = 56Scrolls one item (cell, character, etc...) to the left.
ScrollRight = 57Scrolls one item (cell, character, etc...) to the right.
ScrollUp = 55Scrolls up one item (cell, line, etc...).
SelectAll = 42Selects all objects.
Start = 14Moves to the start (e.g. the top or home).
StartExtend = 29Extends the selection to start (e.g. home or top).
StartOfPage = 12Moves to the top of page.
StartRectangleSelection = 91Starts extending a rectangular selection via pointing-device input.
StartSelection = 90Starts extending a selection via pointing-device input.
Suspend = 78Suspend an application (Only implemented in UnixDriver).
Toggle = 70Toggles something (e.g. the expanded or collapsed state of a list).
ToggleExtend = 33Toggles the selection (or a specific element of the selection).
ToggleOverwrite = 36Toggles overwrite mode such that newly typed text overwrites the text that is already there (typically associated with the Insert key).
Undo = 58Undo changes.
Unindent = 47Removes one level of indentation from the current line or selection.
UnixEmulation = 45Unix emulation.
Up = 4Moves up one (cell, line, etc...).
UpExtend = 21Extends the selection up one item (cell, line, etc...).
WordLeft = 19Moves to the start of the previous word.
WordLeftExtend = 25Extends the selection to the start of the previous word.
WordRight = 20Moves the start of the next word.
WordRightExtend = 26Extends the selection to the start of the next word.
ZoomIn = 86Zooms in.
ZoomOut = 87Zooms out.
Remarks
Application supports a subset of these commands by default, which can be overriden via KeyBindings.
See the Commands Deep Dive for more information: https://gui-cs.github.io/Terminal.Gui/docs/command.html.