Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add kitty keyboard protocol support to Unix _pyrepl#145759

Open
jechol wants to merge 1 commit intopython:mainfrom
jechol:pyrepl-kitty-keyboard
Open

Add kitty keyboard protocol support to Unix _pyrepl#145759
jechol wants to merge 1 commit intopython:mainfrom
jechol:pyrepl-kitty-keyboard

Conversation

@jechol
Copy link

@jecholjechol commentedMar 10, 2026
edited
Loading

Summary

VS Code 1.109 rolled out kitty keyboard protocol support in the integrated terminal viaterminal.integrated.enableKittyKeyboardProtocol. Once enabled, the program running in the terminal needs to request and understand the protocol itself._pyrepl currently does not, which breaks the Unix/macOS Python REPL when keys start arriving as kitty keyboard sequences instead of legacy terminal input.

This PR fixes that by teaching Unix_pyrepl to participate in the protocol and translate kitty key reports back into the existing_pyrepl event model.

  • enable kitty keyboard protocol when Unix_pyrepl prepares the terminal and restore the previous keyboard mode on exit
  • parse kittyCSI u,CSI ~, andCSI 1;... key reports inunix_eventqueue and translate them into existing_pyrepl key events
  • add regression tests for kitty key parsing and update REPL output sanitizing for the new terminal control sequences

Tests

  • ./python.exe -m test -j1 test_pyrepl.test_eventqueue test_pyrepl.test_unix_console
  • ./python.exe -m test -j1 test_pyrepl.test_pyrepl

@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@python-cla-bot
Copy link

python-cla-botbot commentedMar 10, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@ambvambvAwaiting requested review from ambvambv is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@jechol

[8]ページ先頭

©2009-2026 Movatter.jp