Caps Lock key leaks Kitty protocol escape sequence [57358u (regression in 2.1.84)
Resolved 💬 5 comments Opened Mar 26, 2026 by 3shimi Closed Apr 18, 2026
Bug Description
Pressing the Caps Lock key to switch between Chinese/English input methods (IME) outputs the raw Kitty keyboard protocol escape sequence [57358u as text in the terminal. This did not happen in previous versions.
Environment
- Claude Code version: 2.1.84
- Terminal: VS Code integrated terminal
- OS: macOS
- Input method: macOS built-in Chinese/English IME toggle via Caps Lock
Steps to Reproduce
- Open Claude Code 2.1.84 in VS Code terminal
- Press Caps Lock to switch between Chinese and English input
- Observe
[57358ucharacters appearing in the input
Expected Behavior
Caps Lock key press should be silently consumed (as a modifier-only key event) without outputting any characters.
Actual Behavior
The Kitty keyboard protocol escape sequence for Caps Lock (keycode 57358) leaks through as literal text [57358u.
Additional Context
- This is a regression — previous versions of Claude Code did not exhibit this behavior.
- This does not happen in iTerm2, only in Claude Code's terminal.
- The
57358keycode corresponds toCaps_Lockin the Kitty keyboard protocol specification. - Workaround: Use Ctrl+Space instead of Caps Lock for IME switching.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗