namespace Terminal.Gui.App; public static partial class Application // Keyboard handling { /// [Obsolete ("The legacy static Application object is going away.")] public static IKeyboard Keyboard { get => ApplicationImpl.Instance.Keyboard; set => ApplicationImpl.Instance.Keyboard = value ?? throw new ArgumentNullException(nameof(value)); } /// [Obsolete ("The legacy static Application object is going away.")] public static bool RaiseKeyDownEvent (Key key) => ApplicationImpl.Instance.Keyboard.RaiseKeyDownEvent (key); /// /// Raised when the user presses a key. /// /// Set to to indicate the key was handled and to prevent /// additional processing. /// /// /// /// All drivers support firing the event. Some drivers (Unix) do not support firing the /// and events. /// Fired after and before . /// [Obsolete ("The legacy static Application object is going away.")] public static event EventHandler? KeyDown { add => ApplicationImpl.Instance.Keyboard.KeyDown += value; remove => ApplicationImpl.Instance.Keyboard.KeyDown -= value; } /// [Obsolete ("The legacy static Application object is going away.")] public static KeyBindings KeyBindings => ApplicationImpl.Instance.Keyboard.KeyBindings; }