IME switching in VS Code terminal leaks Kitty escape sequences ([57358u)

Resolved 💬 3 comments Opened Mar 26, 2026 by zhaoyang-z Closed Mar 30, 2026

Description

Switching between Chinese/English input methods (IME) in VS Code's integrated terminal causes Kitty keyboard protocol escape sequences to be printed as visible text in the input line.

The most common leaked sequence is [57358u (Shift key), which appears every time the IME is toggled.

Environment

  • Claude Code version: 2.1.84
  • Terminal: VS Code integrated terminal
  • OS: macOS (Darwin 25.3.0)
  • IME: macOS built-in Chinese input method

Steps to Reproduce

  1. Open Claude Code in VS Code integrated terminal
  2. Press Shift or Caps Lock to switch between Chinese and English input methods
  3. Observe [57358u printed in the terminal input

Expected Behavior

IME switch key events should be consumed silently without leaking raw escape sequences.

Notes

This does not occur in the VS Code extension panel, only in the integrated terminal. Likely related to Claude Code enabling the Kitty keyboard protocol, which encodes modifier keys (Shift = 57358) as CSI u sequences that are not properly intercepted during IME events.

View original on GitHub ↗

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