Fcitx5 Not Opening Input Box on Electron or Chromium based applications

Hi. I’ve recently switched over to Wayland and Hyperland and have been facing issues with using Fcitx5 with electron based apps (i.e. Brave and Visual Studio Code). The input box opens normally in Alacritty and Firefox. I’ve tried the solutions on the following post but to no avail.

The relevant portions of my configuration.nix are:

  i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [
        fcitx5-mozc
        fcitx5-gtk
    ];
};

environment.sessionVariables = lib.mkDefault rec {
  NIXOS_OZONE_WL = "1";
};

Any help is appreciated, thanks in advance!

I found a solution to this. When opening a chromium based browser, you run it with fish -c 'brave --enable-features=UseOzonePlatform --enable-wayland-ime' . I have that bound to a key in my hyperland.conf. I’m unsure if it works on other shells besides fish.

References

Fcitx5 not working on Discord under Wayland
Using Fcitx 5 on Wayland

1 Like