Skip to content

Commit 4eddca0

Browse files
authored
Merge pull request #6207 from TomJGooding/feat-windows-kitty-keyboard
feat: add kitty keyboard protocol support on Windows
2 parents c539c25 + d0f9561 commit 4eddca0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2323

2424
- Change highlight style of Select to only highlight the border, not the label https://github.com/Textualize/textual/pull/6214
2525

26+
### Added
27+
28+
- Added support for the kitty keyboard protocol on Windows https://github.com/Textualize/textual/pull/6207
29+
2630
## [6.5.0] - 2025-10-31
2731

2832
### Added

src/textual/drivers/windows_driver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def start_application_mode(self) -> None:
9696
self._enable_mouse_support()
9797
self.write("\x1b[?25l") # Hide cursor
9898
self.write("\033[?1004h") # Enable FocusIn/FocusOut.
99+
self.write("\x1b[>1u") # https://sw.kovidgoyal.net/kitty/keyboard-protocol/
99100
self.flush()
100101
self._enable_bracketed_paste()
101102

@@ -123,6 +124,10 @@ def stop_application_mode(self) -> None:
123124
self._disable_bracketed_paste()
124125
self.disable_input()
125126

127+
# Disable the Kitty keyboard protocol. This must be done before leaving
128+
# the alt screen. https://sw.kovidgoyal.net/kitty/keyboard-protocol/
129+
self.write("\x1b[<u")
130+
126131
# Disable alt screen, show cursor
127132
self.write("\x1b[?1049l" + "\x1b[?25h")
128133
self.write("\033[?1004l") # Disable FocusIn/FocusOut.

0 commit comments

Comments
 (0)