[BUG] Japanese IME (fcitx + Mozc) input broken in Claude Code prompt on Linux
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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
- Install fcitx and Mozc on Linux
- sudo apt install fcitx fcitx-mozc mozc-server
- Set environment variables:
- GTK_IM_MODULE=fcitx
- QT_IM_MODULE=fcitx
- XMODIFIERS=@im=fcitx
- Configure Mozc: enable full-width number input mode
- Launch gnome-terminal and start Claude Code
- In Claude Code's prompt, switch to Japanese input mode (fcitx)
To reproduce symptom 1 (preedit cleared on Space):
- Type any hiragana (e.g., "とうきょう" / "toukyou")
- Press Space to trigger kanji conversion
→ Expected: conversion candidates appear
→ Actual: preedit characters disappear
To reproduce symptom 2 (full-width numbers not displayed):
- 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗