Description
Unable to switch to Chinese input method (fcitx5) in otty on X11. The input method works correctly in other terminals (e.g., Ghostty) on the same system.
Environment
- OS: Linux Mint 22.3 (Xena), X11 session
- otty version: 0.1.0-1
- Input method: fcitx5 (running, XIM server registered as
@server=fcitx5)
- Windowing: winit 0.30.12 (Rust)
Root Cause Analysis
otty uses Rust's winit library for windowing. On X11, winit uses the legacy XIM (X Input Method) protocol via XOpenIM/XCreateIC/XmbLookupString instead of GTK/Qt IM modules. This is a known limitation — winit's XIM implementation has compatibility issues with fcitx5:
- The
GTK_IM_MODULE, QT_IM_MODULE, and XMODIFIERS environment variables have no effect on winit apps, since winit bypasses these and calls Xlib's XIM directly
- winit's XIM preedit rendering and candidate window positioning may not work correctly with fcitx5
Evidence
- Process environment shows correct
GTK_IM_MODULE=fcitx5 and XMODIFIERS=@im=fcitx5, but these are irrelevant for winit
XIM_SERVERS atom correctly shows @server=fcitx5
- winit 0.30.13 (latest stable) has no XIM/fcitx5 fixes — only macOS/Windows IME improvements
- Other GTK-based terminals (Ghostty) work fine with fcitx5
Suggested Fix
Options:
- Upgrade to use a terminal library with proper fcitx5 support (e.g., libvte, alacritty's approach)
- Implement Wayland text-input protocol support (winit has partial
zwp_text_input support which may work better)
- Add a config option to bypass winit's input handling and use a custom XIM implementation
Reproduction Steps
- Install fcitx5 and configure Chinese input (e.g., Pinyin)
- Launch otty on X11
- Try to switch to Chinese input method (Ctrl+Space or Super+Space)
- Chinese characters cannot be input
Workaround
Use a GTK-based terminal (Ghostty, GNOME Terminal, etc.) for Chinese input tasks.
Description
Unable to switch to Chinese input method (fcitx5) in otty on X11. The input method works correctly in other terminals (e.g., Ghostty) on the same system.
Environment
@server=fcitx5)Root Cause Analysis
otty uses Rust's
winitlibrary for windowing. On X11, winit uses the legacy XIM (X Input Method) protocol viaXOpenIM/XCreateIC/XmbLookupStringinstead of GTK/Qt IM modules. This is a known limitation — winit's XIM implementation has compatibility issues with fcitx5:GTK_IM_MODULE,QT_IM_MODULE, andXMODIFIERSenvironment variables have no effect on winit apps, since winit bypasses these and calls Xlib's XIM directlyEvidence
GTK_IM_MODULE=fcitx5andXMODIFIERS=@im=fcitx5, but these are irrelevant for winitXIM_SERVERSatom correctly shows@server=fcitx5Suggested Fix
Options:
zwp_text_inputsupport which may work better)Reproduction Steps
Workaround
Use a GTK-based terminal (Ghostty, GNOME Terminal, etc.) for Chinese input tasks.