Skip to content

Conversation

@mrsaraiva
Copy link

Summary

Windows terminals that don’t implement the Kitty keyboard protocol deliver Alt+key combinations as ESC followed by a character, so Textual only sees the plain key press. This PR adds a fallback path that synthesizes Kitty-style sequences in those cases, enabling Alt bindings without breaking true Kitty support added in #6207.

Fixes #6192

Testing

Added: tests/test_windows_key_sequences.py
Modified: tests/test_xterm_parser.py

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

- add _windows_key_sequences helper to convert ESC+char into Kitty sequences
- run Windows driver input through the helper, preserving Kitty-native output
- cover the behavior in tests/test_windows_key_sequences.py and test_xterm_parser.py
- document limitations in the FAQ and changelog

Fixes Textualize#6192
@mrsaraiva mrsaraiva changed the title Fix windows "Alt" modifier support Fix Windows "Alt" modifier support Nov 18, 2025
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.

Alt+<key> do not work

1 participant