diff --git a/Terminal.Gui/Input/CommandContext.cs b/Terminal.Gui/Input/CommandContext.cs index 095a3976a..786d283e7 100644 --- a/Terminal.Gui/Input/CommandContext.cs +++ b/Terminal.Gui/Input/CommandContext.cs @@ -11,24 +11,20 @@ namespace Terminal.Gui; /// use . /// /// -/// -/// -/// #pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved -public record struct CommandContext +public record struct CommandContext { /// /// Initializes a new instance of with the specified , /// /// /// - /// + /// /// - public CommandContext (Command command, Key? key, KeyBinding? keyBinding = null, object? data = null) + public CommandContext (Command command, TBindingType? binding, object? data = null) { Command = command; - Key = key; - KeyBinding = keyBinding; + Binding = binding; Data = data; } @@ -38,14 +34,9 @@ public record struct CommandContext public Command Command { get; set; } /// - /// The that is being invoked. This is the key that was pressed to invoke the . + /// The keyboard or mouse minding that was used to invoke the , if any. /// - public Key? Key { get; set; } - - /// - /// The KeyBinding that was used to invoke the , if any. - /// - public KeyBinding? KeyBinding { get; set; } + public TBindingType? Binding { get; set; } /// /// Arbitrary data.