If you use US International keyboard on Linux, you know the royal pain of having to press space after the compose character (typically
'). Contractions like can't, won't, Mary's, etc are a struggle, as you have to press
', otherwise you'll get canť, wonť, Maryś, etc.
It's even more painful if you ever used Windows, as its US Intl Keyboard works fine out of the box. It's a shame that Linux keyboard is horribly "broken" (some may say it's by design; no, it's not).
It has been asked before, but most answers will point you to use xim, which will open another can of worms. You'll end up in a rabbit hole of Chrome bugs and intrincated workarounds to make Sublime work (spoiler: it won't). Before you realize, the weekend is gone.
After spending a lot of time troubleshooting, I got to a deceptively simple arrangement, allowing .XCompose customizations on GTK+, QT, Aura (Chromium), and even on plain terminal:
Get rid of the default iBus, xim and everything else, and just go with uim.
Of course, YMMV. I'm running Ubuntu 14.04 with Gnome 3.12.1, and using Chrome v38.0.2125.66 beta, and Sublime Text 3 build 3064.
This also has the added benefit of allowing Unicode characters using
Note that Sublime overrides the default keybinding for
Ctrl+Shift+U with soft_redo (source ). You have two options here: 1) edit the default keybinding file - which is not recommended, as it'll be overwritten on your next upgrade, or 2) use
Ctrl+Shift+Alt+U. I've chosen the latter.
- Install uim with
sudo apt-get install uim
- Check which inputs you have installed with
im-config -l. Remove everything except for uim and xim (optional, but recommended)
- Set default input to uim, using
im-config -n uim
- On System Config, Keyboard, select "US, intl with dead keys"
- On System Config, Language Support, confirm you have uim under Keyboard input method system. If you removed the other input systems, you should have only uim/none here
Add the following lines to /etc/environment:
GTK_IM_MODULE=uim QT_IM_MODULE=uim xmodmap -e 'keycode 48 = dead_acute dead_diaeresis dead_acute dead_diaeresis acute diaeresis'
- Get this
.XComposefile and put on your home directory, using
wget http://j.mp/XCompose ~
- Log out, log back in and enjoy!
Don't forget to say thanks to @tamh, who did all the hard work to map the correct keys on the .XCompose.