Korean IME toggle key (Caps Lock / 한영키) leaks raw keycode '57358u' into input

Resolved 💬 3 comments Opened Mar 27, 2026 by ssk-lang Closed Mar 30, 2026

Description

On macOS with Korean keyboard layout, pressing the Korean/English input method toggle key (한영키, typically mapped to Caps Lock) inserts the literal string 57358u into the input field instead of being silently consumed.

Steps to Reproduce

  1. macOS with Korean (2-Set) + ABC input sources configured
  2. Open Claude Code in terminal
  3. Press the 한영키 (Caps Lock) to switch between Korean and English input
  4. Observe 57358u being typed into the prompt

Expected Behavior

The key press should be consumed silently (input method switches without any text insertion).

Actual Behavior

The literal string 57358u appears in the input field each time the key is pressed.

Analysis

The keycode 57358 corresponds to CAPS_LOCK in the Kitty keyboard protocol (CSI u). The terminal sends \e[57358u when Caps Lock is pressed, but Claude Code's input handler does not recognize this as a special/modifier key and passes the raw sequence through as text.

Environment

  • OS: macOS (Darwin 25.3.0)
  • Input Sources: Korean 2-Set + ABC
  • 한영키 mapping: Caps Lock (default macOS Korean keyboard behavior)
  • Terminal: default shell (zsh)

View original on GitHub ↗

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