private void TargetWindow_KeyDown(OpenToolkit.Windowing.Common.KeyboardKeyEventArgs obj)
        {
            ConsoleRenderProgramKeyEventArgs args = new ConsoleRenderProgramKeyEventArgs(obj);

            OnKeyDown(args);

            if (args.Intercept)
            {
                return;
            }

            if (obj.Key == Key.Enter || obj.Key == Key.KeypadEnter)
            {
                WriteLine();
                return;
            }

            if (obj.Key == Key.BackSpace)
            {
                if (CursorLeft < 1)
                {
                    return;
                }

                CursorLeft--;
                SetGlyph(Cursor.X, Cursor.Y, null);
                return;
            }

            string value = OpenGL.KeyInput.KeyConverter.Default.KeyToString((int)obj.Key, Renderer.TargetWindow.KeyboardState, Renderer.TargetWindow.KeyboardState.IsKeyDown(Key.CapsLock));

            if (!string.IsNullOrEmpty(value))
            {
                Write(value);
            }
        }
 protected virtual void OnKeyDown(ConsoleRenderProgramKeyEventArgs e)
 {
     KeyDown?.Invoke(this, e);
 }
        private void TargetWindow_KeyUp(OpenToolkit.Windowing.Common.KeyboardKeyEventArgs obj)
        {
            ConsoleRenderProgramKeyEventArgs args = new ConsoleRenderProgramKeyEventArgs(obj);

            OnKeyUp(args);
        }