claude-code - 💡(How to fix) Fix Chinese IME input not passed to input box correctly

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

  • This happens on both macOS (iTerm2 + native IME) and Windows (WezTerm + Chinese IME), suggesting it may be a general IME composition event handling issue in the TUI input layer.
  • Workaround: switch to English input mode before typing commands.
RAW_BUFFERClick to expand / collapse

Bug Description

When using a Chinese Input Method Editor (IME), typing text (e.g., /clear) does not get written into the Claude Code input box. The characters seem to be swallowed by the IME composition layer and never committed to the input field.

Environment

  • OS 1: macOS 15.x, native Chinese (Simplified) input method, iTerm2
  • OS 2: Windows, Chinese IME, WezTerm
  • Claude Code version: latest

Steps to Reproduce

  1. Enable Chinese input method (in Chinese mode, not switched to English)
  2. Open Claude Code in terminal (iTerm2 on Mac / WezTerm on Windows)
  3. Try to type /clear or any text into the Claude Code input box
  4. Characters are not entered into the input box

Expected Behavior

Text should be committed to the input box after IME composition completes (e.g., pressing Enter or Space to confirm the candidate, or typing pure ASCII characters).

Actual Behavior

The input is lost / not passed to the input field. The input box remains empty or partial.

Notes

  • This happens on both macOS (iTerm2 + native IME) and Windows (WezTerm + Chinese IME), suggesting it may be a general IME composition event handling issue in the TUI input layer.
  • Workaround: switch to English input mode before typing commands.

extent analysis

TL;DR

Implementing proper IME composition event handling in the TUI input layer may resolve the issue of characters being swallowed by the IME composition layer.

Guidance

  • Investigate how the TUI input layer handles IME composition events, focusing on committing text to the input field after composition completes.
  • Verify if the issue persists when using a different terminal emulator or input method editor to isolate the problem.
  • Consider adding a feature to automatically switch to English input mode when the user starts typing a command, as a temporary workaround.
  • Review the documentation of the terminal emulators (iTerm2 and WezTerm) to see if there are any specific settings or configurations that can help resolve the issue.

Example

No code snippet is provided due to the lack of specific technical details about the TUI input layer implementation.

Notes

The solution may require modifications to the TUI input layer to properly handle IME composition events, which could involve significant changes to the underlying code. Additionally, the issue may be specific to certain input methods or terminal emulators.

Recommendation

Apply a workaround, such as automatically switching to English input mode when the user starts typing a command, until a proper fix for the IME composition event handling can be implemented. This is because the root cause of the issue seems to be related to how the TUI input layer handles IME events, and a workaround can provide a temporary solution for users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Chinese IME input not passed to input box correctly