Skip to content

tui: fix shift+space/backspace/delete on kitty-protocol terminals#411

Merged
badlogic merged 1 commit intobadlogic:mainfrom
nathyong:feature/shift-backspace
Jan 2, 2026
Merged

tui: fix shift+space/backspace/delete on kitty-protocol terminals#411
badlogic merged 1 commit intobadlogic:mainfrom
nathyong:feature/shift-backspace

Conversation

@nathyong
Copy link
Copy Markdown
Contributor

@nathyong nathyong commented Jan 2, 2026

Kitty and other smart terminals send a specific CSI u control code for these shifted special keys, which are interpreted as a no-op by the editor component. These should send the original key instead, matching the behaviour of other TUI programs (e.g. readline, vim insert mode).

On less smart terminals, these key combinations are the same as the non-shifted versions, and so already work with the existing code.

Kitty and other smart terminals send a specific CSI u control code for
these shifted special keys, which are interpreted as a no-op by the
editor component. These should send the underlying key instead, matching
the behaviour of other TUI programs (e.g. readline, vim insert mode).

On less smart terminals, these key combinations are the same as the
non-shifted versions, and so already work with the existing code.
@nathyong
Copy link
Copy Markdown
Contributor Author

nathyong commented Jan 2, 2026

Instead of using separate functions for isShiftBackspace and isShiftDelete, we could also change the existing isBackspace and isDelete functions to catch these codes - hides the intent slightly, but they have the equivalent behaviour.

@badlogic badlogic merged commit 3506ac8 into badlogic:main Jan 2, 2026
badlogic added a commit that referenced this pull request Jan 2, 2026
badlogic added a commit that referenced this pull request Jan 2, 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.

2 participants