IBus

IBus (Intelligent Input Bus) is an open source input framework for Linux and Unix.

Installation
Except for the basic IBus framework, one or more engines should be installed. For example:

Have a look at the eix output for more available engines:

For graphical toolkit integration, offers gtk (this refers to gtk+:2) and gtk3 useflags, and there is a separate  package for Qt (including KDE) as well.

You can use for selecting your preferred input method.