Table of Contents

Method InvokeCommand

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

InvokeCommand(Command, Key?, KeyBinding?)

Invokes the specified command.

public bool? InvokeCommand(Command command, Key? key = null, KeyBinding? keyBinding = null)

Parameters

command Command

The command to invoke.

key Key

The key that caused the command to be invoked, if any. This will be passed as context with the command.

keyBinding KeyBinding?

The key binding that was bound to the key and caused the invocation, if any. This will be passed as context with the command.

Returns

bool?

null if no command was found; input proessing should continue. false if the command was invoked and was not handled (or cancelled); input proessing should continue. true if the command was invoked the command was handled (or cancelled); input proessing should stop.

InvokeCommand(Command, CommandContext)

Invokes the specified command.

public bool? InvokeCommand(Command command, CommandContext ctx)

Parameters

command Command

The command to invoke.

ctx CommandContext

Context to pass with the invocation.

Returns

bool?

null if no command was found; input proessing should continue. false if the command was invoked and was not handled (or cancelled); input proessing should continue. true if the command was invoked the command was handled (or cancelled); input proessing should stop.