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.

  • 1
    Usually it's because different toolkits (Athena, Motif, Gtk, KDE, …) use different input methods. What does env | grep IM show? Do you have an input method configured anywhere? – Gilles 'SO- stop being evil' Nov 9 '14 at 9:20
  • @Gilles here it is. – Hi-Angel Nov 9 '14 at 9:23
  • @Gilles I didn't knew about a different input methods… So, do I have to install ibus to fix it? Also I am wondering wouldn't it conflict with KDE keyboard settings? As I remember, the ibus have its own settings too. – Hi-Angel Nov 9 '14 at 9:26
  • @Gilles well, I remember I tried ibus, and it seemed to me raw. I couldn't find how to stop the daemon (it isn't present in /etc/init.d/ and in list of KDE's services), the only way I found was to purge it. Also I just installed it again, and found that it don't even have a setting to have a different layouts by a windows. Are there a way to use the native KDE input method for all applications? – Hi-Angel Nov 9 '14 at 9:46
  • I found two interesting details. The first is that even for «ibus» isn't installed, I have the package «ibus-qt4». And it have the file ibqtim-ibus.so, lsof of which shows that it is being used by a KDE apps. The second appeared from this question: for I press «Compose+a+_», it gives the ā in Emacs, and the ª FireFox, and etc. I guess I have to try to remove this package, and see does it fix the problem. – Hi-Angel Nov 9 '14 at 10:48

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.

  • Also I found that im-config in some cases instead of saving a new configuration falls with a GTK error. I guess this a feature because for this case the application have a flag -c → it launches a terminal UI 😄 – Hi-Angel Dec 2 '14 at 10:58
  • I have fixed your grammar, as the answer was had to read. Can you check that I have not changed the intended meaning. – ctrl-alt-delor Aug 12 '19 at 14:51
  • note im-config is in package im-config and not installed by default on debian. so do apt install im-config – ctrl-alt-delor Aug 12 '19 at 14:53
  • @ctrl-alt-delor oh, thanks, when I wrote this answer I was very bad at english. I'll edit it in a sec though, because there's a typo (simpley), and also "didn't programmed with GUI" quite the opposite of "not a programmer" :) But thank you anyway! – Hi-Angel Aug 12 '19 at 14:55
  • 1
    @TomAnderson I'm on Manjaro. When I tried to follow exactly these steps, it also happened to me that the compose key stopped working (I'm testing on firefox). Then, following this: wiki.archlinux.org/index.php/Fcitx#XIM and messing around a bit, I found out that adding export GTK_IM_MODULE DEFAULT=xim and export QT_IM_MODULE DEFAULT=xim to both /etc/profile and /etc/X11/xinit/xinitrc/ did the job. – izzorts Sep 14 '20 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.