Fixes #5097. Kitty is wasting the keyboard shortcuts Ctrl+Shift+Alt+A/Z which returns as Ctrl+Alt+A/Z#5098
Merged
tig merged 8 commits intogui-cs:developfrom Apr 28, 2026
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
tig
requested changes
Apr 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses kitty keyboard protocol parsing so modifier state (notably Ctrl+Shift+Alt) is preserved correctly, and adjusts text-input widgets to allow printable AltGr-generated characters while continuing to block most Alt/Ctrl-modified key insertions.
Changes:
- Preserve Ctrl+Shift+Alt modifier combinations when parsing kitty
CSI usequences. - Allow TextField/TextView to insert printable AltGr combinations (via kitty associated text) while still rejecting most modified keys.
- Update Key shifted-printable rendering (AsGrapheme/AsRune) and expand/adjust kitty parsing tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/UnitTestsParallelizable/Views/TextViewTests.cs | Updates Alt+letter regression test setup/comments for kitty-associated-text behavior. |
| Tests/UnitTestsParallelizable/Views/TextFieldTests.cs | Updates Alt+letter regression test setup/comments for kitty-associated-text behavior. |
| Tests/UnitTestsParallelizable/Drivers/AnsiHandling/KittyKeyboardParsingTests.cs | Adjusts expectations for shifted printable keys and adds modifier/AltGr regression coverage. |
| Tests/UnitTestsParallelizable/Drivers/AnsiHandling/KittyAlternateKeyTests.cs | Updates end-to-end expectations for alternate keys with modifiers. |
| Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.cs | Allows printable AltGr (Alt+AssociatedText) insertion while blocking other modified keys. |
| Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs | Same AltGr insertion logic as TextView (with a small formatting issue). |
| Terminal.Gui/Input/Keyboard/Key.cs | Ensures shifted alternate keycodes produce correct grapheme/rune (esp. A–Z). |
| Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs | Modifier-field handling changes and associated-text suppression tweaks for modified keys. |
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Proposed Changes/Todos
Pull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)