So there's some really interesting stuff going on with Fcitx5, and for most time it has been stable enough to replace the aging Fcitx4.
For most open source software, they uses Qt Library provided by the operating system, and so they have no problem loading the corresponding IM module. But for some proprietary software, they have its own Qt library (likely due to the incompatibility between different Qt versions), which does not want to work with the system IM module at all. Yikes.
So we are gonna to fix it! The author of Fcitx, csslayer, has already wrote an awesome article about this topic (which you can find it here). This article just explain some more details about the procedure and change some steps to make it work with
Prepare the stuff
For obvious reasons, you will need to build the library with the same Qt version that the absolutely proprietary software. Just take a look at where the Qt libraries live in, and some of them has the exact version number at the end of their file name (something like
If they don't have a version number in their file name (like
Mathematica), you can also just check the contents of the library. Use the following command:
should give you an exact version.
Then, we will need to download the corresbonding version of Qt from Qt website. In this example, we will try to add Fcitx5 support to Zoom, and (for now) they are using Qt 5.9.6, so just download the installer from here and install it. We only need Qt itself for Desktop (Something like
Desktop gcc 64bit).
We will need a compiled version
fcitx5 in the system. In Arch Linux and AOSC OS, this can be easily done by installing the package from official repository.
Also, we need
extra-cmake-modules, also available in official repository.
Compile the module.
Clone the fcitx5-qt repository, and run this in the repository:
It should go very smoothly if you have everything prepared.
Then, head toward
$REPO/qt5/platforminputcontext, and run
And it should spill out a
libfcitx5platforminputcontextplugin.so we need. Hooray!
Relink the module to the right Qt library
But not so fast. Since during the build, it is using the Qt library from our Qt installation, not the actual Qt library the proprietary software is actually using. Sometimes the library will (magically) work, but we'd still better link it to the correct library the program is going to use.
Check the output for the last output, there should be something like this:
Note that at the end, the library is dynamically linked to the Qt libraries in our Qt installation. That's not correct. We need to replace it with the Qt library found in the software. Replace the path with the actual location of Qt lib in the proprietary software. The end result should look like this (still use zoom as an example):
After this, we can now copy the generated library to the destination folder, which is usually located in
platforminputcontexts inside the proprietary software's Qt library directory.
And then, everything should work.