Ubuntu – Custom compose key sequences without xim (e.g. in Sublime Text 2)

compose-keysublime-text

I have quite a few custom compose key sequences. I know I can get them working with an ~/.XCompose and switching the input method to xim. However, Sublime Text 2 doesn't accept any compose key sequences when I'm using xim. It does accept them when I'm using the default input method. I think I reported this bug for Sublime Text 2 a while ago.

Using the default input method, I added the contents of my ~/.XCompose to /usr/share/X11/locale/en_US.UTF-8/Compose but this did not change anything. Is there any way I can get the compose key sequences in my ~/.XCompose to work without relying on xim?

Best Answer

I know you asked this a year ago, but in case it ever helps someone, here’s what worked for me to enable custom .XCompose additions:

sudo apt-get install uim
export "GTK_IM_MODULE=uim"
(log out and in again)

uim is an input method which respects the compose file additions, but also enables the functionality not available in xim, eg Ctrl+Shift+U to enter a hex Unicode character ID.

This may work for the OP’s situation, if he still needs a solution, I don’t know.

Related Question