Skip to content

Fix regressions with Del and NumPad arrow keys in TTY and WX backends related to the new Kitty keyboard protocol#3410

Open
unxed wants to merge 2 commits into
elfmz:masterfrom
unxed:fix_3409
Open

Fix regressions with Del and NumPad arrow keys in TTY and WX backends related to the new Kitty keyboard protocol#3410
unxed wants to merge 2 commits into
elfmz:masterfrom
unxed:fix_3409

Conversation

@unxed

@unxed unxed commented May 24, 2026

Copy link
Copy Markdown
Contributor
  1. Update IsEnhancedKey in TTYBackend.cpp to include VK_INSERT and VK_DELETE so they receive the ENHANCED_KEY flag, fixing TTY Del translation.
  2. Modify VT_TranslateKeyToKitty to avoid appending CAPSLOCK_ON and NUMLOCK_ON modifiers to sequences unless alternate keys or full reporting is requested (flags & (4 | 8)). This prevents nolegacy from being spuriously activated when NumLock is on, allowing proper fallback to legacy sequences.
  3. VT_TranslateKeyToKitty to fall back to legacy sequence behavior for NumPad navigation keys unless full reporting mode (flags & 8) is requested, ensuring compatibility with applications that do not support the full Kitty protocol.

Fixes #3409

… related to the new Kitty keyboard protocol

1. Update `IsEnhancedKey` in `TTYBackend.cpp` to include `VK_INSERT` and `VK_DELETE` so they receive the `ENHANCED_KEY` flag, fixing TTY Del translation.
2. Modify `VT_TranslateKeyToKitty` to avoid appending `CAPSLOCK_ON` and `NUMLOCK_ON` modifiers to sequences unless alternate keys or full reporting is requested (`flags & (4 | 8)`). This prevents `nolegacy` from being spuriously activated when NumLock is on, allowing proper fallback to legacy sequences.
3. `VT_TranslateKeyToKitty` to fall back to legacy sequence behavior for NumPad navigation keys unless full reporting mode (`flags & 8`) is requested, ensuring compatibility with applications that do not support the full Kitty protocol.

Fixes elfmz#3409
@unxed unxed changed the title [WIP] Fix regressions with Del and NumPad arrow keys in TTY and WX backends related to the new Kitty keyboard protocol Fix regressions with Del and NumPad arrow keys in TTY and WX backends related to the new Kitty keyboard protocol May 25, 2026
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.

Keyboard regression in 2.8.0: Del key and NumPad arrow keys not working in terminal applications (OpenCode)

1 participant