#nullable enable // These classes use a key binding system based on the design implemented in Scintilla.Net which is an // MIT licensed open source project https://github.com/jacobslusser/ScintillaNET/blob/master/src/ScintillaNET/Command.cs namespace Terminal.Gui; /// /// Provides a collection of objects that are scoped to . /// /// /// /// public record struct KeyBinding { /// Initializes a new instance. /// The commands this key binding will invoke. /// Arbitrary context that can be associated with this key binding. public KeyBinding (Command [] commands, object? context = null) { Commands = commands; Data = context; } /// Initializes a new instance. /// The commands this key binding will invoke. /// The scope of the . /// The view the key binding is bound to. /// Arbitrary data that can be associated with this key binding. public KeyBinding (Command [] commands, View? boundView, object? data = null) { Commands = commands; BoundView = boundView; Data = data; } /// The commands this key binding will invoke. public Command [] Commands { get; set; } /// /// The Key that is bound to the . /// public Key? Key { get; set; } /// The view the key binding is bound to. public View? BoundView { get; set; } /// /// Arbitrary context that can be associated with this key binding. /// public object? Data { get; set; } }