#nullable enable
namespace Terminal.Gui;
///
/// Provides context for a that is being invoked.
///
///
/// To define a that is invoked with context,
/// use
///
///
public record struct CommandContext
{
///
/// Initializes a new instance of with the specified ,
///
///
///
public CommandContext (Command command, Key? key)
{
Command = command;
Key = key;
}
///
/// The that is being invoked.
///
public Command Command { get; set; }
///
/// The that is being invoked. This is the key that was pressed to invoke the .
///
public Key? Key { get; set; }
}