Table of Contents

Method TryGet

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

TryGet(Key, out KeyBinding)

Gets the commands bound with the specified Key.

public bool TryGet(Key key, out KeyBinding binding)

Parameters

key Key

The key to check.

binding KeyBinding

When this method returns, contains the commands bound with the specified Key, if the Key is found; otherwise, null. This parameter is passed uninitialized.

Returns

bool

true if the Key is bound; otherwise false.

TryGet(Key, KeyBindingScope, out KeyBinding)

Gets the commands bound with the specified Key that are scoped to a particular scope.

public bool TryGet(Key key, KeyBindingScope scope, out KeyBinding binding)

Parameters

key Key

The key to check.

scope KeyBindingScope

the scope to filter on

binding KeyBinding

When this method returns, contains the commands bound with the specified Key, if the Key is found; otherwise, null. This parameter is passed uninitialized.

Returns

bool

true if the Key is bound; otherwise false.