Table of Contents

Property HotKey

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

HotKey

The HotKey is used to activate a MenuItem with the keyboard. HotKeys are defined by prefixing the Title of a MenuItem with an underscore ('_').

Pressing Alt-Hotkey for a MenuBarItem (menu items on the menu bar) works even if the menu is not active. Once a menu has focus and is active, pressing just the HotKey will activate the MenuItem.

For example for a MenuBar with a "_File" MenuBarItem that contains a "_New" MenuItem, Alt-F will open the File menu. Pressing the N key will then activate the New MenuItem.

See also ShortcutKey which enable global key-bindings to menu items.

public Key? HotKey { get; }

Property Value

Key