Modifier keys doesn't work under kde plasma 6.7.x and fcitx 5

the modifier key combos broke in latest kde plasma 6.7.x when enabling the fcitx5 in virtual kehboard. Here are some exception cases,

  • ctrl c/ ctrl v only output c and v
  • shift a doesn’t switch to captical a
  • ctrl l output sl rather then clear the screen in konsole
  • backspace key sometimes doesn’t work

it works in previous plasma 6.6, does anyone have the same issue, thanks.

Yes, I have the same issue. I think it’s because the fcitx version in Ubuntu 24.04 LTS isn’t new enough, while Plasma 6.7.x has dropped the old Wayland input protocol. Wayland has been around for years but still feels like a toy — I don’t think there’s any straightforward fix.

On the bug tracker, someone suggested replacing fcitx with the Flatpak version. If you have the means, you could give that a try.

However, my system can’t access any sites outside the DEB mirror sources, so I have to stick with the old Fcitx and hope that Neon upgrades to Ubuntu 26.04 LTS sooner rather than later.

As a workaround, here’s what I’m currently doing (for reference only):

  • In Settings → Keyboard → Virtual Keyboard, select Fcitx 5 Wayland Launcher. When starting up, Fcitx will complain that you should choose Fcitx 5 instead, but just ignore that.

  • In /etc/environment, set these variables:

    text

    export GTK_IM_MODULE=fcitx5
    export QT_IM_MODULE=fcitx5
    export XMODIFIERS=@im=fcitx5
    
  • For all Chromium-based applications, add GDK_BACKEND=x11 GTK_IM_MODULE=fcitx5 XMODIFIERS=@im=fcitx5 to their environment variables, and add --ozone-platform=x11 to their startup parameters, forcing them to run under XWayland as a temporary workaround.

I don’t have any GNOME software on my system, so I can’t comment on that situation.

The Flatpak version works well for me. Thanks a lot for your advice :hand_with_index_finger_and_thumb_crossed:

Here are the steps to use the Flatpak version:

sudo apt autoremove --purge fcitx5*
flatpak install flathub org.fcitx.Fcitx5
flatpak install flathub org.fcitx.Fcitx5.Addon.ChineseAddons
sudo apt install fcitx5-frontend-all

Then go to virtual keyboard in system settings and select Fcitx5, done

If you’re in mainland China, you might need this:

flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub

If you don’t have an IPv6 address, use https://ipv4.mirrors.ustc.edu.cn/flathub instead.

My company firewall restricts external access. DEB packages have built-in mirrors, but there’s no workaround for Flatpak.