Compose Key Issues – Some Apps Don’t Accept Characters from Compose Key

character encodingcompose-keykdex11

The problem is that the compose key works fine, but some application doesn't accept some characters from it. E.g. I can type the character in Emacs (Compose+8+8), but this won't work in FireFox, Konsole and Kate. But many other characters, e.g. typed there (in FireFox, Konsole and Kate) with Compose work just fine. Also I may insert a problem symbols with a simple copy-paste (from any of two clipboards).

So, what could cause it, and how to fix it?

Sorry, but I have no idea how to research the issue. I found people whose Compose key didn't worked at all in some apps, but in my case it is works, though somehow partially.

Setup: the compose key bound to the right Super key in both /etc/default/keyboard and KDE keyboard settings.

Best Answer

Thanks to @Gilles, I found an answer. So, the problem was with different Input Methods, used by different applications; and IMs in turn use different Compose files — ones used by X are /usr/share/X11/locale/<your-locale>/Compose and ~/.XCompose (the last isn't present by default, but you may create it for custom combinations), and the one used by Qt is in… Well, looks like nobody knows.

The solution is to set xim to be used as default input method by all applications. You can call im-config, and choose there xim as the default input method, or you can manually edit /etc/profile file to add these lines:

export GTK_IM_MODULE=xim
export XMODIFIERS=@im=xim
export QT_IM_MODULE=xim

Not sure about im-config, but for the way with /etc/profile reboot will be needed.

Related Question