Table of Contents

Struct CommandContext

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Provides context for a Command that is being invoked.

public record struct CommandContext : IEquatable<CommandContext>
Implements
Inherited Members

Remarks

To define a Command that is invoked with context, use AddCommand(Command, Func<CommandContext, bool?>).

Constructors

CommandContext(Command, Key?, KeyBinding?)

Initializes a new instance of CommandContext with the specified Command,

Properties

Command

The Command that is being invoked.

Key

The Key that is being invoked. This is the key that was pressed to invoke the Command.

KeyBinding

The KeyBinding that was used to invoke the Command, if any.