14

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.

7
  • 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? Commented Nov 9, 2014 at 9:20
  • @Gilles here it is. Commented Nov 9, 2014 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. Commented Nov 9, 2014 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? Commented Nov 9, 2014 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. Commented Nov 9, 2014 at 10:48

1 Answer 1

9

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.

6
  • 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 😄 Commented Dec 2, 2014 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. Commented Aug 12, 2019 at 14:51
  • note im-config is in package im-config and not installed by default on debian. so do apt install im-config Commented Aug 12, 2019 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! Commented Aug 12, 2019 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. Commented Sep 14, 2020 at 20:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.