Supposedly, new custom compose key combinations can be defined in the ~/.XCompose file. This seems to work well for GTK applications like gedit, firefox and gnome-terminal. But it isn't working for applications like atom, sublime and vscode even though the default compose key combinations are working. I tried adding new custom compose key combinations to the start of the system compose file at /usr/share/X11/locale/en_US.UTF-8/Compose but that didn't work for any applications.

How can new compose key combinations be defined for all applications?

As UTF-8 is becoming increasingly prolific, the compose key feature of Linux keyboard input is more important than ever before. I'm interested in understanding what pieces of software is at play here.

I am using Ubuntu 18.04 with Gnome. Would it help if I were using KDE?

Edit: It seems that .XCompose does work with QT applications like kate and kwrite but still not atom, sublime or vscode, using iBus or XIM.

Edit2: It seems that sublime works with the uim input method but not atom or vscode. It seems that the vscode team identified the problem in issue #34277 and points to issue #506838 in chromium. Comments on the chromium issue point out that the issue seems to be fixed now in the browser as of at least Feb 12 2018 but clearly what ever fixed it didn't make it to electron based applications yet.


The way I'm aware of is to enable the XIM input method, which you can do from Language Support. At next login your ~/.XCompose file should then be effective also for QT apps.

Caveat: XIM is an old technique, and some users experience issues. Still worth a try IMO.

  • Thanks for pointing out Language Support and XIM. I tried this and noticed that even with XIM, atom, sublime and vscode didn't work. But I did notice that Qt apps like kate and kwrite do work with both ibus and xim. Maybe it has to do with something specific to the electron framework? – Matthew Palermo May 21 '18 at 11:31
  • @MatthewPalermo: Possibly. I'm not able to tell. – Gunnar Hjalmarsson May 21 '18 at 11:52

This problem is now fixed in the new Atom version 1.28 implying that Electron 2.0 fixes this problem. Other electron apps should also be fixed when they upgrade. As explained in my edits to my question, it appears that this problem is now essentially solved for all but Sublime text which uses it's own custom GUI toolkit and apparently can be patched with sublime-imethod-fix.

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.