Table of Contents

Method AddKeyBinding

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

AddKeyBinding(Key, params Command[])

Adds a new key combination that will trigger the given command (if supported by the View - see GetSupportedCommands())

If the key is already bound to a different Command it will be rebound to this one

Commands are only ever applied to the current View(i.e. this feature cannot be used to switch focus to another view and perform multiple commands there)
public void AddKeyBinding(Key key, params Command[] command)

Parameters

key Key
command Command[]

The command(s) to run on the View when key is pressed. When specifying multiple commands, all commands will be applied in sequence. The bound key strike will be consumed if any took effect.