Uim

uim (short for "universal input method") is a multilingual input method framework. Applications can use it through so-called bridges.

Supported applications
uim supports the X Window System legacy XIM (short for X Input Method) through the  bridge. Many X applications are written in either GTK+ or Qt, which have their own modules dealing with input methods, and uim supports both of these with its GTK+ and Qt immodules.

uim has a bridge for the console, Emacs , and macOS (MacUIM).