Caps Lock key leaks Kitty protocol escape sequence [57358u (regression in 2.1.84)

Status Fixed / completed
Reported on v2.1.84
Maintainer reply ✓ Yes — ashwin-ant
Activity 5 comments · opened Mar 26, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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

  1. Open Claude Code 2.1.84 in VS Code terminal
  2. Press Caps Lock to switch between Chinese and English input
  3. Observe [57358u characters 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 57358 keycode corresponds to Caps_Lock in the Kitty keyboard protocol specification.
  • Workaround: Use Ctrl+Space instead of Caps Lock for IME switching.

View original on GitHub ↗

5 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/39129
  2. https://github.com/anthropics/claude-code/issues/39067
  3. https://github.com/anthropics/claude-code/issues/38967

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

hansol-cpu · 5 months ago

Reproducing on v2.1.84, macOS (Darwin 25.3.0). Korean IME toggle key (한영키, Caps Lock mapped) leaks [57358u into the input field. Was working fine on the previous version. This blocks normal Korean/English switching workflow for all Korean-speaking users.

rosvend · 5 months ago

+1 — Same issue on Ubuntu (LTS 24.04.03) with zsh terminal.

Pressing Caps Lock outputs raw [57358u escape sequence into the input field.

Claude Code version: latest 2.1.83
IDE: Connected to VS Code extension version 2.1.83 (server version: 2.1.84)

ashwin-ant collaborator · 4 months ago

This was fixed in v2.1.85 — Caps Lock no longer leaks [57358u into the input, and the VS Code integrated terminal no longer enables Kitty keyboard mode. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.