Fcitx5 doesn't work with sway

None of the guides and issues I’ve found online have been helpful.

My config is as follows:

  i18n.inputMethod = {
    enable = true;
    type = "fcitx5";
    fcitx5.waylandFrontend = true;
    fcitx5.addons = with pkgs; [
      kdePackages.fcitx5-chinese-addons
      fcitx5-rime
      fcitx5-gtk
      rime-data
    ];
  };

I do not have the “简体中文” entry in the fcitx5-configtool, which seems to be the one I need: Pinyin input method in Hyprland / Wayland for Simplified Chinese - #2 by sshine , even though I’ve tried both kdePackages.fcitx5-chinese-addons and qt6Packages.fcitx5-chinese-addons . I only have “Keyboard - Chinese” as an input method.

On super+;, I get a “quick phrase” menu but can’t seem to trigger a menu to enter Hanzi with pinyin. I do not get any popups when I’m just typing (should I? I’m not sure - this seems to say it should always be there: Chinese input - almost there - #9 by shamrocklee). I do have a notification bar icon with the current input method.

I use fcitx5 with Sway just fine. We need a lot more details like what app are you using or what app are you typing in? What input methods do you have configured in the fcitx5 config tool? A screenshot of the input methods would be helpful, along with any other config you set.

  i18n = {
    inputMethod = {
      enable = true;
      type = "fcitx5";
      fcitx5.addons = [
        pkgs.fcitx5-gtk
        pkgs.qt6Packages.fcitx5-chinese-addons
      ];
    };
  };

This is my config which has even less, and I’m able to type via pinyin. I’ll see if I can get screenshots of the fcitx5 config later.

After nixos-rebuild switch you need to do a reboot and then you may can see the pinyin input method lies in the fcitx5-configtool. Don’t forget to turn off the Only Show Current Language.

This doesn’t matter. Once you start searching, that checkbox doesn’t exist.

Anyway, “pinyin” is the method to select; there is no 简体中文 entry (and even the category name likely that depends on your locale).

Also check the Global Options tab if you want to change the relevant shortcuts to switch input methods.