Caps Lock inserts raw Kitty protocol sequence [57358u in VSCode terminal input
Bug Description
When pressing Caps Lock in the Claude Code VSCode integrated terminal, the raw Kitty keyboard
protocol escape sequence [57358u is inserted into the input field as text.
## Steps to Reproduce
- Open Claude Code in VSCode integrated terminal
- Focus on the input field
- Press Caps Lock key
## Expected Behavior
Caps Lock should be silently ignored - it is a modifier-only key and should not produce any text
input.
## Actual Behavior
The string [57358u appears in the input field.
## Root Cause
VSCode terminal (xterm.js) uses the Kitty keyboard protocol, which encodes modifier keys as CSI
sequences. Caps Lock is sent as \e[57358u. Claude Code input handler does not filter out
modifier-only Kitty sequences, so the raw escape code is interpreted as literal text.
Other potentially affected keys:
- Num Lock: 57360
- Scroll Lock: 57359
## Suggested Fix
Filter out modifier-only Kitty protocol sequences in the terminal input handler so they are not
treated as text input.
## Environment
- OS: macOS (Darwin 25.3.0)
- Terminal: VSCode integrated terminal
- Claude Code: CLI (latest)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗