Common input method

Cim stands for Common input method.

Input methods in Linux and BSD are fragmented.
There are many input methods in Linux and BSD, such as XIM, Gtk-IM, Qt-IM, and Wayland-IM.

Cim is software that integrates these input methods.

Already, the Gtk input method and the Qt input method are plugin methods, and it has already been proven that there is no problem for decades when these plugin methods are used for input.

However, since the Gtk input method and Qt input method depend on Gtk and Qt, respectively, X-only, Java, Wayland-only, and console-only applications cannot use such Gtk and Qt input methods.

So I designed a common input method with C API by removing the dependency on Gtk from the Gtk input method.

Cim is made with C API and has no dependencies, so it can be used in various computer languages and applications.

How it works

cim.h contains interfaces and types.

  • Location of plugins

Place the input method plugins implementing the Cim input context API as follows:

  • The location of the symbolic link pointing to the plugin

It is recommended to select input plugins via a symbolic link rather than an environment variable. This is because an environment variable may not be set in some circumstances. Also, the symbolic link approach makes it easy to create configuration tools.

~/.config/ is a symbolic link to the input method plugin like ibus, fcitx, nimf, uim.

ln -sf /usr/lib/input.d/ ~/.config/
  • Try it

Now, when an application or GUI toolkit calls the Cim input context API, the input method works through it.

If you want to change the input method to fcitx, you can simply reset the symbolic link.

ln -sf /usr/lib/input.d/ ~/.config/

In this way, XIM, GTK-IM, QT-IM, Wayland-IM, etc. can be replaced and integrated. However, there is a problem that input is not possible in Snap or Flatpak. If various applications or GUI toolkits call Cim input context API, the input problem in Snap or Flatpak can be easily solved by accessing $HOME/.config/

Integration is practically possible

Even if applications such as Wayland, Snap, Flatpak, or GUI toolkits such as Gtk or Qt do not adopt Cim, input methods can be integrated in practice if various bridges that implement Cim are provided.

You need to set environment variables to use it this way.


The following plugins can call third-party input methods such as nimf, ibus, fcitx, and uim via ~/.config/


Since XIM and Wayland-IM require communication, a daemon(cimd) is needed. cimd can load and, and they call the Cim input context API.


Actually, this is technically possible.
However, Flatpak and Snap applications can use input methods via ~/.config/ If that’s not possible, you’ll need to contact the Flatpak and Snap developers.

Benefits to input tool developers

Assuming that the Cim implementation includes the above plugins and daemon, even if the input tool(IME) developer does not implement Gtk-IM, Qt-IM, XIM and Wayland-IM, just implementing Cim input context API will enable typing in Gtk, Qt, X and Wayland applications.

Technical Support for Cim / 1 year

24/7 email support $ 30


Cim is provided in the form of source code.