Kitty keyboard protocol escape sequences leak into input (e.g. Caps Lock → [57358u)
Resolved 💬 2 comments Opened Mar 26, 2026 by SipengXie2024 Closed Apr 18, 2026
Description
When using Claude Code in VS Code's integrated terminal with the Kitty keyboard protocol enabled (default in recent VS Code versions), pressing non-functional keys like Caps Lock produces raw escape sequences (e.g. [57358u) that leak into the input field.
Steps to Reproduce
- Open Claude Code in VS Code integrated terminal (v1.113.0+)
- Ensure
terminal.integrated.keyboard.protocolis set toauto(default) - Press Caps Lock
Expected Behavior
Caps Lock (and other non-bound modifier keys) should be silently ignored.
Actual Behavior
The raw Kitty protocol escape sequence [57358u appears in the input field each time Caps Lock is pressed.
Environment
- Terminal: VS Code integrated terminal 1.113.0
- TERM: xterm-256color
- Shell: zsh 5.9
- OS: Linux (Ubuntu)
Workaround
Set terminal.integrated.keyboard.protocol to none in VS Code settings.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗