Table of Contents

Method Add

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Add(Key, KeyBinding)

Adds a KeyBinding to the collection.

public void Add(Key key, KeyBinding binding)

Parameters

key Key
binding KeyBinding

Add(Key, KeyBindingScope, params Command[])

Adds a new key combination that will trigger the commands in commands.

If the key is already bound to a different array of Commands it will be rebound commands.

public void Add(Key key, KeyBindingScope scope, params Command[] commands)

Parameters

key Key

The key to check.

scope KeyBindingScope

The scope for the command.

commands Command[]

The command to invoked on the View when key is pressed. When multiple commands are provided,they will be applied in sequence. The bound key strike will be consumed if any took effect.

Remarks

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).

Add(Key, params Command[])

Adds a new key combination that will trigger the commands in commands (if supported by the View - see GetSupportedCommands()).

This is a helper function for Add(Key, KeyBindingScope, params Command[]) for Focused scoped commands.

If the key is already bound to a different array of Commands it will be rebound commands.

public void Add(Key key, params Command[] commands)

Parameters

key Key

The key to check.

commands Command[]

The command to invoked on the View when key is pressed. When multiple commands are provided,they will be applied in sequence. The bound key strike will be consumed if any took effect.

Remarks

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).