Chinese input - almost there

I’ve been struggling with Chinese character input, and am almost there (I think), but could really use some help. I can’t figure out how to get a dropdown selection menu with possible characters from pinyin input.

I’m using plasma and nixos unstable. This is the stanza I added to my configuration.nix based on the wiki:

   21    i18n.inputMethod = {
   20      enable = true;
   19      type = "fcitx5";
   18      fcitx5 = {
   17        waylandFrontend = true;
   16        addons = with pkgs; [
   15          fcitx5-chinese-addons
   14          fcitx5-mozc
   13          fcitx5-gtk
   12          rime-data
   11          fcitx5-rime
   10        ];
    9      };
    8    };

In the plasma configuration I chose fcitx5 wayland in Virtual Keyboard, and I added the Chinese keyboard in Input Method.

I can switch between the two, and in English Shft-Ctl-H gives me popup autocompletions, but when I switch to the Chinese keyboard it doesn’t give any options. When doing Shft-Ctl-H I do see a brief popup window mentioning something about spell (?) but it disappears too fast for me to read it. The popup doesn’t appear when invoking Shft-Ctl-H when using the English keyboard, so I’m guessing I need to install some other package.

Thanks in advance for any help.

2 Likes

“Chinese keyboard” is just a keyboard layout. What you are looking for is probably “Pinyin”.

From your use of fcitx5-rime, I guess you would like to use the Rime Input Method Engine. It provides multiple flow-based input schema, including Pinyin and Bopomofo. Still, it would be helpful if you elaborate your expected setup.

I’m personally using the Chewing Input Method for Bopomofo input, using the Fcitx5 input method framework and fcitx5-chewing. I’m not familiar with the word hint functionality of Fcitx5. Do you have any successful experience making Fcitx5 word hint work to together with Rime on other platforms?

Where do I find that setting?

Pinyin entry would be much easier for me. According to the website “Ctl-" should give me a dropdown to select a character based on the pinyin I type. (That's what happens in English anyway with the hint-mode turned on without pressing "ctl-” so I thought it just looked different.) I wanted the Rime Engine because I understood it was the way to get the traditional characters instead of the simplified ones.

Thank you for your help.

You don’t need the word hints to use the drop-down menu to select characters or words.

Could you show the link to the website description?

It’s at Rime RIME | 中州韻輸入法引擎

You don’t need the word hints to use the drop-down menu to select

How do I select them then?

I used the Home Manager option i18n.inputMethod to setup the input method, and I tested Rime a few minutes before.

The word selection menu is always there, and you don’t even need to invoke it.

The input schema menu can be called by pressing the keys Ctrl`.

Here’s my setup:

{
  i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [
      fcitx5-chewing
      fcitx5-rime
      rime-data
    ];
  };
}

(I’m not sure if it’s proper to place rime-data under fcitx5.addons, but it seems working.)

by pressing the number keys on the top row of the keyboard.

The problem is that when I do “ctl-`” nothing happens. I don’t get a list to select from.

I tried with your configuration but the same problem…nothing happens with ctrl-`

Give a try installing ibus-engines.mozc and ibus-engines.table-chinese, they tend to work better than fcitx5 in my experience

I have tried with ibus. When I select Ibus as virtual keyboard in kde I get the error message:

Please unset QT_IM_MODULE and GTK_IM_MODULE environment variables and 'ibus-daemon --panel disable' should be executed as a child process of ibus-ui-gtk3 component. 

For clarity, this is what I have now:

 i18n.inputMethod = {
    enable = true;
     type = "ibus";
     ibus.engines = with pkgs.ibus-engines; [
         mozc
         table-chinese
          rime
         pinyin
        ];
      };

I’m unclear how to add the input method in plasma itself. If I try to add it in the ibus preferences (from the toolbar icon), nothing related to Chinese comes up. Should I add a Chinese keyboard in system configuration?

Huh. Last time I used it was on Debian xfce actually, I just installed ibus-mozc there and it worked. I tried installing ibus-engines.mozc and some Japanese fonts on NixOS Plasma to try, I manually ran the application IBus Preferences from the Start menu and it returns an error, but the input method switcher is activated correctly, but on Debian it works much better. I don’t know if I need more packages or what, but the core functionality is there. Give it a try

I appreciate your help.

1 Like

No problem, we are all here to help each other. Let me know how it goes

ibus-engines.pinyin might be more appropriate in your case

I did add that, too. None are available (or I can’t find them) in Ibus Preferences/Input methods.

BTW, have you installed kimpanel? It’s a necessity when using Fcitx5 on GNOME, but probably not on KDE. (GNOME chose to integrate with IBus only. Don’t know what they were thinking when making such a design decision.)

Average GNOME’s decision

1 Like