Skip to content

Merged v2_release into v2_develop after publishing 1894#3999

Merged
tig merged 1 commit intov2_developfrom
v2_release
Mar 21, 2025
Merged

Merged v2_release into v2_develop after publishing 1894#3999
tig merged 1 commit intov2_developfrom
v2_release

Conversation

@tig
Copy link
Copy Markdown
Collaborator

@tig tig commented Mar 21, 2025

No description provided.

@tig tig merged commit df0fcd3 into v2_develop Mar 21, 2025
Copilot AI added a commit that referenced this pull request Apr 10, 2026
tig added a commit that referenced this pull request Apr 11, 2026
…Capabilities (#4927)

* Initial plan

* Fixes #3999. Remove IDriver.GetVersionInfo, add IDriver.KittyKeyboardCapabilities

Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f93a30b7-6649-4c5a-95bd-014fb4f1eb2a

Co-authored-by: tig <585482+tig@users.noreply.github.com>

* Fix parameter name in SetKittyKeyboardCapabilities xml doc

Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f93a30b7-6649-4c5a-95bd-014fb4f1eb2a

Co-authored-by: tig <585482+tig@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor Kitty keyboard protocol detection & enablement

Centralize Kitty keyboard enable/disable logic in KittyKeyboardProtocolDetector, removing it from AnsiOutput. Simplify KittyKeyboardCapabilities by replacing SupportedFlags and EnabledFlags with a single Flags property. Update MainLoopCoordinator and driver to use the new API, and make KittyKeyboardCapabilities settable on IDriver. Update all usages and tests to use the new Flags property. Remove obsolete code and tests from AnsiOutput. Improve logging and tracing for Kitty protocol detection and driver initialization. Update Keys scenario and UICatalogRunnable to display Kitty protocol status using the new approach.

* Improve kitty keyboard protocol negotiation & cleanup

Enhances driver and main loop to reliably enable kitty keyboard mode on startup (with post-enable detection of actual flags) and disable it on shutdown before disposing output. Updates KittyKeyboardProtocolDetector to confirm and store enabled flags. Reduces debug output by commenting trace lines. Updates docs to clarify negotiation and shutdown flow. Adds/updates tests to verify enable/disable sequences and capability updates.

* Add tests for mixed Kitty and legacy input deduplication

Added a new test region to KittyKeyboardPipelineTests to ensure no duplicate KeyDown events are raised when both Kitty CSI-u sequences and legacy printable characters are received for the same keypress. Tests cover generic printable keys, Portuguese keyboard characters, and Kitty sequences with associated text, addressing terminal behaviors that emit both input types.

* Fixes #4918 - Suppress duplicate keydown for Kitty+legacy printable input

Added suppression logic in AnsiInputProcessor to prevent duplicate keydown events when both Kitty CSI-u and legacy printable sequences are received for the same key. Introduced virtual methods in InputProcessorImpl for customizable suppression. Updated related tests for style consistency.

* Update Terminal.Gui/Drivers/IDriver.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardProtocolDetector.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardCapabilities.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Make IDriver.KittyKeyboardCapabilities get-only; move set responsibility to DriverImpl.SetKittyKeyboardCapabilities

Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/3b2bd475-1a29-40c5-877b-3b81ae948a10

Co-authored-by: tig <585482+tig@users.noreply.github.com>

* deleted old plans

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant