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
Extension Methods

Fields

Application = 4

The and the bound Commands will be invoked regardless of which View has focus. This is typically used for global commands, which are called Shortcuts.

The View does not need to be visible.

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

Disabled = 0

The key binding is disabled.

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 hierarchy and the bound Commands will be invoked even when the View does not have focus, as long as some View up the SuperView hierachy does have focus. This is typically used for HotKeys.

The View must be visible.

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.

See Also