Fix parsing multiple keys#6592
Merged
Merged
Conversation
19 tasks
ekzhu
added a commit
to agentscope-ai/QwenPaw
that referenced
this pull request
Jul 1, 2026
Typing with an input method -- Chinese, Japanese, Korean, accented
Latin, ZWJ emoji, etc. -- leaked a raw terminal escape sequence into the
prompt instead of inserting the text. For example, typing "我知道"
produced:
我[32;;19981:30693:36947u
Root cause is upstream in Textual. When an IME commits more than one
codepoint at once, the terminal sends them in a single Kitty
keyboard-protocol "associated text" field as colon-separated codepoints
(e.g. "\x1b[..;..;25105:30693:36947u"). textual<=8.2.7 neither matched
the colons in its CSI-u parser regex nor decoded past the first
codepoint, so the whole sequence surfaced as literal text.
textual 8.2.8 fixes this (Textualize/textual#6592) by parsing all
colon-separated codepoints and emitting one key event per codepoint.
Bump the dependency floor so the bundled TUI picks up the fix; no
QwenPaw code change is required.
Verified on textual 8.2.8: the parser turns the sequence into the three
key events 我 / 知 / 道, and the TUI unit suite passes.
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.
The kitty key protocol provide multiple characters in the text field for a single keypress, which Textual wasn't parsing.
When you hit option+n followed by a forward slash, the terminal sends a single sequence containing two text characters. Textual translates this into 2 key events, which results in apps doing the right thing.
Fixes #6562