claude-code - 💡(How to fix) Fix [BUG] Japanese IME (fcitx + Mozc) input broken in Claude Code prompt on Linux [1 participants]

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…
GitHub stats
anthropics/claude-code#46446Fetched 2026-04-11 06:20:04
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4mentioned ×1subscribed ×1

Error Message

Error Messages/Logs

Root Cause

Root cause (suspected)

Claude Code appears to intercept raw keystrokes before fcitx can process them, completely bypassing IME input handling.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • OS: Ubuntu (Linux)
  • Terminal: gnome-terminal (TERM=xterm-256color)
  • IME: fcitx + Mozc (full-width number input enabled)

Problem

Japanese IME input is broken in Claude Code's prompt. Two symptoms:

1. Preedit cleared when pressing Space When typing Japanese (hiragana), pressing Space to trigger kanji conversion causes the preedit characters to disappear instead of showing conversion candidates.

2. Full-width numbers not displayed When Mozc is set to full-width number input mode, typing numbers produces no output — neither in preedit nor as direct input.

Both issues occur only in Claude Code's prompt. Other terminal applications (bash, vim, etc.) work correctly with the same IME setup.

Root cause (suspected)

Claude Code appears to intercept raw keystrokes before fcitx can process them, completely bypassing IME input handling.

Note

Issue #22853 was closed, but this issue still reproduces on Linux (gnome-terminal + fcitx + Mozc).

What Should Happen?

1. Space key should trigger kanji conversion
When typing Japanese hiragana in preedit and pressing Space,
the IME should display kanji conversion candidates (same behavior
as in other terminal applications like bash or vim).

2. Full-width numbers should appear
When Mozc is set to full-width number input mode, typing numbers
should display full-width characters (e.g., 123) in preedit, consistent with standard Mozc behavior outside Claude Code.

Error Messages/Logs

Steps to Reproduce

  1. Install fcitx and Mozc on Linux
    • sudo apt install fcitx fcitx-mozc mozc-server
  2. Set environment variables:
    • GTK_IM_MODULE=fcitx
    • QT_IM_MODULE=fcitx
    • XMODIFIERS=@im=fcitx
  3. Configure Mozc: enable full-width number input mode
  4. Launch gnome-terminal and start Claude Code
  5. In Claude Code's prompt, switch to Japanese input mode (fcitx)

To reproduce symptom 1 (preedit cleared on Space):
6. Type any hiragana (e.g., "とうきょう" / "toukyou")
7. Press Space to trigger kanji conversion
→ Expected: conversion candidates appear
→ Actual: preedit characters disappear

To reproduce symptom 2 (full-width numbers not displayed): 6. Type any number (e.g., "123")
→ Expected: full-width numbers appear in preedit (123) → Actual: nothing is displayed

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.101

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

gnome-terminal

extent analysis

TL;DR

The issue can be addressed by modifying Claude Code to properly handle IME input, potentially by not intercepting raw keystrokes before fcitx can process them.

Guidance

  • Investigate how Claude Code intercepts keystrokes and determine if there's a way to bypass this interception for IME input handling.
  • Verify if other terminal applications with similar IME setups work correctly to confirm the issue is specific to Claude Code.
  • Consider adding a configuration option to Claude Code to enable proper IME input handling, potentially by integrating with fcitx and Mozc more seamlessly.
  • Test the issue with different IME settings and configurations to see if the problem persists, which could help identify the root cause.

Example

No specific code example can be provided without more details on Claude Code's internal implementation, but the solution likely involves modifying the keystroke handling mechanism to accommodate IME input.

Notes

The exact fix may depend on the internal implementation of Claude Code and how it interacts with the Linux input system and IME tools like fcitx and Mozc. The issue might require changes to how Claude Code processes keystrokes or integrates with these tools.

Recommendation

Apply a workaround by modifying Claude Code's keystroke handling to properly support IME input, as upgrading to a fixed version is not currently an option since the issue persists in the latest version (

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