Property HotKey | Terminal.Gui v2 (original) (raw)

Namespace

Terminal.Gui

Assembly

Terminal.Gui.dll

HotKey

Gets or sets the hot key defined for this view. Pressing the hot key on the keyboard while this view has focus will invoke HotKey. By default, the HotKey is set to the first character of Textthat is prefixed with HotKeySpecifier.

A HotKey is a keypress that causes a visible UI item to perform an action. For example, in a Dialog, with a Button with the text of "_Text" Alt+T will cause the button to gain focus and to raise itsAccepting event. Or, in aTerminal.Gui.Menu with "_File _Edit", Alt+F will select (show) the "_File" menu. If the "_File" menu has a sub-menu of "_New" Alt+N or N will ONLY select the "_New" sub-menu if the "_File" menu is already opened.

View subclasses can use AddCommand(Command, CommandImplementation) to define the behavior of the hot key.

public Key HotKey { get; set; }

Property Value

Key