fix: recognize kitty CSI-u codepoints for F1 through F12 - #2378
Open
ashokDevs wants to merge 1 commit into
Open
Conversation
Codepoints 57364-57375 (F1-F12) were missing from the kitty-protocol codepoint table, so terminals that send function keys as full CSI-u sequences (e.g. Ghostty, which enables the kitty keyboard protocol by default) had those keys silently dropped. Confirmed live against a running herdr session: injecting the raw F3/F4 codepoint sequences did nothing before this fix and correctly triggered previous_tab/next_tab after. refs herdrdev#1809
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe input parser now decodes Kitty functional key codepoints ChangesKitty functional key parsing
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
kitty_codepoint_to_keycodemapped codepoints for F13-F35 (57376-57398) but had no entries for F1-F12 (57364-57375), so those silently fell through toNone. Terminals that send function keys as full kitty CSI-u sequences (e.g. Ghostty, which enables the kitty keyboard protocol by default) had F1-F12 dropped entirely.Reproduction
Confirmed live against a running herdr session: built the binary, started an isolated dev session with
previous_tab/next_tabbound to F3/F4, and injected the raw byte sequences a kitty-protocol terminal sends for those keys (\x1b[57366ufor F3,\x1b[57367ufor F4) directly into the pane. Before the fix, both did nothing. After the fix, both correctly switched tabs.I could not reproduce the exact asymmetry in #1809 (reporter says F2/F4 worked but F3 didn't) - in my testing the gap affects F1-F12 uniformly. This fix addresses the confirmed underlying gap either way.
Tests
just lintjust ci(3066 tests, 0 failures)kitty_f1_through_f12_codepoints_are_recognized, replacingunknown_kitty_functional_key_remains_unsupportedwhich had codified the gap as expected behaviorrefs #1809