Setting up local input methods is one of the most important but frustrating work for non-English Linux users. Here I share how I setup CJK (Chinese, Japanese, Korean) input methods.
Installation
Install packages. Below is for Arch Linux, in other Linux distributions, package names may vary.
sudo pacman -S \
fcitx fcitx-configtool fcitx-qt5 \
fcitx-chewing fcitx-hangul fcitx-mozc fcitx-ui-lightfcitx-chewing: For Chinese.fcitx-hangul: For Korean.fcitx-mozc: For Japanese.
Add the following to ~/.xprofile or ~/.xinitrc depending on your environment. Refer to Set environment variables for IM modules.
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitxThen, logout and login, launch the app Fcitx Configuration, click + to add CJK input methods (uncheck Only Show Current Language to see all input methods).
Configure shortcuts that switch between input methods.
- Trigger Input Method: Switch between English and CJK.
- Scroll between Input Method: Switch between Chinese, Japanese, Korean.
The CJK input methods should now be ready!
Usage Notes
General
Ctrl + Alt + Shift + Uto search for Unicode characters, like emojis.
Japanese (fcitx-mozc)
- I set "Input mode" to "Romaji".
- To type Hiragana(平仮名): Just type the romanization of the Japanese characters.
- To type Katakana(片仮名): Type Hiragana, then press
F7. - To type Hankaku Kana(半角カナ): Type Hiragana, then press
F8. - To type Sukuon(促音): Prepend
xbefore the character you want to type. e.g. typechixyoforちょ. - To type ー(長音符): Press the minus button.
Issues
- Do not install
ibus, it conflicts withfcitx. Be careful of Zoom, its Arch Linux package brings its ownibus, which is guaranteed to accidentally break the system.
