[BUG] Caps Lock (Korean/English toggle) inserts raw escape sequence [57358u on macOS

Resolved 💬 3 comments Opened Mar 26, 2026 by yosyus-Yo Closed Apr 18, 2026

Description

Pressing the Caps Lock key (used as Korean/English input source toggle on macOS) inserts the literal text [57358u into the Claude Code input field instead of being silently handled.

Environment

  • OS: macOS Sequoia (latest)
  • Shell: zsh (updated recently)
  • Claude Code: latest version (CLI)
  • Keyboard: macOS Korean input with Caps Lock as input source toggle

Steps to Reproduce

  1. Open Claude Code CLI on macOS
  2. Start typing in the input field
  3. Press Caps Lock to toggle between Korean/English input
  4. Observe [57358u being inserted as literal text

Expected Behavior

Caps Lock key press should be silently consumed (it's used for input source switching on macOS Korean keyboards), not inserted as text.

Actual Behavior

The raw Kitty keyboard protocol escape sequence [57358u (keycode 57358 = Caps Lock) is inserted as literal text into the input field.

Additional Context

  • This is a Kitty keyboard protocol issue. The keycode 57358 corresponds to Caps Lock in the Kitty protocol spec.
  • The same issue was reported in VS Code: https://github.com/microsoft/vscode/issues/304679
  • Adding printf '\e[>0u' to .zshrc does NOT fix this because Claude Code uses its own terminal UI (ink/yoga), not the shell's terminal directly.
  • Ctrl+C also sometimes becomes unresponsive, possibly related to the same Kitty protocol handling issue.
  • This started happening after a recent zsh/macOS update, suggesting a change in how macOS sends Caps Lock events to terminal applications.

Workaround

Use Ctrl+Space for Korean/English input switching instead of Caps Lock while in Claude Code.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗