Add Fcitx5 Support

Hi Guys,

Could you please add support for Linux Fcitx5 input in your next release? It’s already possible to do that manually by copying plugin as described in this Reddit post:

The only difference is that for official installation the folder should be /usr/local/share/anki/bin/PyQt5/Qt/plugins/platforminputcontexts/ instead of /usr/libexec/anki/PyQt5/Qt/plugins/platforminputcontexts/.

It doesn’t seem like there are any mentions of fcitx5, only those of old fcitx are present.

The following file is in beta 2. Does it not work?


@dae, oh… got it. Thanks for the clarification. Then I suppose the next release should fix the issue.

It would help if you could give it a try and confirm it actually works. And again when the next beta comes out, as the packaging process needs some tweaks.

I’ve installed the latest 2.1.50 Qt5 Beta 2 on Manjaro VM and it seems like it doesn’t include that file in the appropriate directory. The directory hierarchy for the installation changed. platforminputcontexts folder is now located at: /usr/local/share/anki/lib/PyQt5/Qt5/plugins/platforminputcontexts/.
During investigation I’ve noticed that there was also another folder named platforminputcontext instead of platforminputcontexts located at /usr/local/share/anki/lib/PyQt5/Qt5/plugins/. This one contained After I’ve cut and paste the file into platforminputcontexts folder fcitx5 started to work.
In conclusion it’s needed to fix the output folder for that plugin.

Thanks for testing. To confirm, if you uninstall Anki, install it again, and then rename the platforminputcontext folder to platforminputcontexts, it works correctly - the issue was just the missing s?

You’re welcome! Not exactly, you cannot rename platforminputcontext to platforminputcontexts, since platforminputcontexts already exist in the same location with some files in it. So the solution is to move from platforminputcontext to platforminputcontexts. As for platforminputcontext, this directory could probably be deleted, because no other files except for were there.

1 Like

I just tried installing Beta 2 (anki-2.1.50%2Bbeta2_db804d95-linux-x86_64-qt5.tar.zstd) and see a few notable differences to what @AnkiUser15733570 described (maybe I’ve installed the wrong thing?). This is on Manjaro as well.

  1. I only have a platforminputcontexts directory (and it’s in a different place):
/usr/local/share/anki  find . -name 'platforminput*'
  1. I don’t have the fcitx5 plugin at all:
/usr/local/share/anki/bin/PyQt5/Qt/plugins/platforminputcontexts  ls

Double checking it’s not somewhere else:

/usr/local/share/anki  find . -name '*fcitx*'

If I understand properly, that’s the fcitx shared library, not fcitx5.

Those files look like they’re from a 2.1.49 installation. Did you run from the beta folder? I recommend you run the uninstall script, then install the beta again.

Ooops. You’re right. I also seem to have… some version of anki install in ~/.local/bin. Once I ensured I actually was opening the beta, everything worked having relocated the shared library.