[BUG] Alt+Delete deletes entire line and Ctrl+Delete only deletes 1 char in chat input (Linux, kitty terminal)
Description
In the chat input's text editing, word-delete keybindings behave incorrectly:
Alt+Deletedeletes the entire line (expected: delete one word forward, likekill-wordin readline/fish)Ctrl+Deletedeletes only a single character (expected: delete one word/token forward)
For reference, Ctrl+Backspace and Alt+Backspace work correctly (both delete a whole word backward), so the bug is specific to the forward-delete side.
This looks related to #77457 (kitty CSI-encoded modified key being misinterpreted as "delete to end of line" instead of "delete word") and #80285 (Ctrl+Delete word-delete missing on Windows Terminal), but reproduced here on Linux with the kitty terminal + fish shell, and with the additional Alt+Delete-whole-line symptom which isn't described in either.
Environment
- OS: CachyOS (Arch-based) Linux, kernel 7.1.4-1-cachyos
- Terminal: kitty 0.48.0
TERM:xterm-kitty- Shell: fish 4.8.1
- Claude Code version: 2.1.220
Steps to reproduce
- Open Claude Code in kitty terminal on Linux
- Type a multi-word line in the chat input, e.g.
un deux trois - Place cursor before
un - Press
Ctrl+Delete→ onlyuis deleted (expected:undeleted) - Retype the line, place cursor before
un - Press
Alt+Delete→ the entire line is deleted (expected: onlyundeleted)
Additional notes
We verified this is not a kitty or fish misconfiguration — fish_key_reader and bind both confirm kitty sends correctly distinguishable key events (ctrl-delete, alt-delete) and fish's own bindings for these (kill-token, kill-word) are set up correctly for word-level deletion in the fish shell itself. The bug only reproduces inside Claude Code's own chat input, which has no dedicated rebindable action for word-delete in ~/.claude/keybindings.json (confirmed no chat:deleteWord* action exists), so this can't be worked around via keybindings config.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗