Table of Contents

Enum KeyBindingScope

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Defines the scope of a Command that has been bound to a key with Add(Key, params Command[]).

[Flags]
public enum KeyBindingScope

Fields

Application = 4

The key binding will be triggered regardless of which view has focus. This is typically used for global commands.

Focused = 1

The key binding is scoped to just the view that has focus.

HotKey = 2

The key binding is scoped to the View's SuperView and will be triggered even when the View does not have focus, as long as the SuperView does have focus. This is typically used for HotKeys.

Use for Views such as MenuBar and StatusBar which provide commands (shortcuts etc...) that trigger even when not focused.

HotKey-scoped key bindings are only invoked if the key down event was not handled by the focused view or any of its subviews.

Remarks

Key bindings are scoped to the most-focused view (Focused) by default.