Repository navigation
input(feat[kitty]): Add alternate keys and text (#30) - #54
Merged
Merged
Conversation
tony
force-pushed
the
feat/ghostty-oracle-cov
branch
from
November 28, 2026 20:10
704a6ac to
bc4d20b
Compare
why: Kitty keyboard protocol flags REPORT_ALTERNATE_KEYS (4) and REPORT_ASSOCIATED_TEXT (16) require shifted/base-layout key subparameters and UTF-32 codepoint lists without promoting standalone legacy keys to CSI u when neither DISAMBIGUATE (1) nor REPORT_ALL_KEYS (8) is active. what: - Add optional single-character shifted_key and base_key fields to KeyEvent and populate US-ASCII shifted_key in KeyEvent.parse - Format CSI key[:shifted[:base]] ; [mods[:event]] ; [text-codepoints] u sequences in encode_input, rejecting non-printable and surrogate scalars - Document and doctest Kitty alternate-key encoding in CHANGES and docs/topics/protocols-and-input.md
tony
force-pushed
the
feat/kitty-alt-assoc-keys
branch
from
November 28, 2026 20:14
eeea3c5 to
9bd371d
Compare
21 of 28 tasks
This branch was successfully deployed
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.
Closes #30 (depends on #53)
Summary
Implements Kitty Keyboard Protocol flags
REPORT_ALTERNATE_KEYS(4) andREPORT_ASSOCIATED_TEXT(16) inKeyEventandencode_input()(CSI key[:shifted[:base]] ; [mods[:event]] ; [text-codepoints] u).What changed
libvt.input.KeyEvent: add optional single-charactershifted_keyandbase_keyfields (ValueErroron multi-character strings) and populate US-ASCIIshifted_keyinKeyEvent.parse("shift+...").libvt.input.encode_input: emit:shifted(whenKeyMod.SHIFTis active and distinct frombase_cp) and:basesubparameters underREPORT_ALTERNATE_KEYS, emit:-joined UTF-32 associated text codepoints on non-release events underREPORT_ASSOCIATED_TEXT, rejectC0/C1/UTF-16 surrogate codepoints, and avoid promoting standalone>4u/>16ulegacy keys toCSI uunlessDISAMBIGUATE(1) orREPORT_ALL_KEYS(8) is also active.tests/test_input.py,docs/topics/protocols-and-input.md, andCHANGES: unit tests, doctests, and changelog documentation.