Method AddKeyBindingsForHotKey | Terminal.Gui v2 (original) (raw)

Namespace

Terminal.Gui

Assembly

Terminal.Gui.dll

AddKeyBindingsForHotKey(Key, Key, object?)

Adds key bindings for the specified HotKey. Useful for views that contain multiple items that each have their own HotKey such as RadioGroup.

public virtual bool AddKeyBindingsForHotKey(Key prevHotKey, Key hotKey, object? context = null)

Parameters

prevHotKey Key

The HotKey hotKey is replacing. Key bindings for this key will be removed.

hotKey Key

The new HotKey. If Empty prevHotKey bindings will be removed.

context object

Arbitrary context that can be associated with this key binding.

Returns

bool

true if the HotKey bindings were added.

Exceptions

ArgumentException