Skip to content

Fix Kitty disambiguation for extended function keys#20246

Open
danyalahmed1995 wants to merge 1 commit into
microsoft:mainfrom
danyalahmed1995:repro/issue-20243-kitty-f13-f20
Open

Fix Kitty disambiguation for extended function keys#20246
danyalahmed1995 wants to merge 1 commit into
microsoft:mainfrom
danyalahmed1995:repro/issue-20243-kitty-f13-f20

Conversation

@danyalahmed1995
Copy link
Copy Markdown

Summary

Fixes #20243.

When Kitty keyboard disambiguation mode is enabled with ESC[>1u, extended function keys F13 through F24 were still falling through to the legacy DECFNK path.

That caused keys such as F13 through F20 to 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[57376u
  • ...
  • F24 -> ESC[57387u

This updates the disambiguation path to promote the existing Kitty extended function-key range before the legacy function-key encoding handles it.

Tests

  • Added regression coverage for PushKittyFlags(D) / disambiguation mode.
  • Verified F13 through F24 emit Kitty CSI-u sequences.
  • Verified lower legacy function keys such as F5 and F12 still emit their existing legacy sequences.
  • git diff --check passes.

I attempted the targeted Adapter unit test build locally, but my Visual Studio install is missing the C++ targets:

Microsoft.Cpp.Default.props was not found

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F13-F20 do not send proper Kitty protocol escape sequences in applications that support Kitty protocol

1 participant