"fcitx" is very broken in some applications, running under pengwin. "iBus" works much better under pengwin.
You do not need to change your default language, but you need to install the package of your target language. The example below install a Chinese package, WITHOUT changing default language to Chinese.
- run in terminal: sudo nano /etc/locale.gen
- remove the comment sign before "zh_CN.UTF8 UTF8"
- to download language package(s), run in terminal: sudo locale-gen
sudo apt install ibus ibus-libpinyin ibus-table-cangjie5 ibus-gtk* ibus-qt*
im-config
select "OK"
select "Yes" to question "Do you explicitly select the user configuration?"
select "ibus"
select "OK"
select "OK"
dbus-launch ibus-daemon -drx
dbus-launch ibus-setup
ATTENTION! A restart of ibus service is necessary to make changes in setup effective.
pkill ibus-daemon
dbus-launch ibus-daemon -drx
Create file /etc/profile.d/ibus.sh, with the following content:
export LC_CTYPE="zh_CN.UTF-8"
export XIM=ibus
export XIM_PROGRAM=/usr/bin/ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export DefaultIMModule=ibus
ibus-daemon -drx
If you have fcitx installed via pengwing-setup, edit /etc/profile.d/fcitx.sh to remove fcitx-autostart and fcitx's variables.
Alternatively,
sudo rm /etc/profile.d/fcitx*
We found ibus works perfectly with Windows virtual keyboard.
Press Ctrl + space on Windows virtual keyboard can switch ibus input methods.