Fix Kitty disambiguation for extended function keys#20246
Open
danyalahmed1995 wants to merge 1 commit into
Open
Fix Kitty disambiguation for extended function keys#20246danyalahmed1995 wants to merge 1 commit into
danyalahmed1995 wants to merge 1 commit into
Conversation
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
Fixes #20243.
When Kitty keyboard disambiguation mode is enabled with
ESC[>1u, extended function keysF13throughF24were still falling through to the legacy DECFNK path.That caused keys such as
F13throughF20to emit sequences like:F13 -> ESC[25~F14 -> ESC[26~F15 -> ESC[28~F18 -> ESC[32~F19 -> ESC[33~F20 -> ESC[34~Instead, Kitty protocol expects these keys to emit CSI-u sequences:
F13 -> ESC[57376uF24 -> ESC[57387uThis updates the disambiguation path to promote the existing Kitty extended function-key range before the legacy function-key encoding handles it.
Tests
PushKittyFlags(D)/ disambiguation mode.F13throughF24emit Kitty CSI-u sequences.F5andF12still emit their existing legacy sequences.git diff --checkpasses.I attempted the targeted Adapter unit test build locally, but my Visual Studio install is missing the C++ targets: