Compose key
The compose key is, among other things, a facility in X Window System that provides a modifier key which, when held down through the typing of a sequence of other keys, enters a character or string not present (or not easily entered) on the current key layout. It's similar to Windows's Alt+NNNN sequences, but the codes used are more intuitive. For example, "é" is Compose+'+e, and ™ is Compose+t+m.
My personal preference is to use Caps Lock as the Compose key, since it has a position and size out of proportion with its utility.
Contents
Windows
WinCompose is based on the trusty AutoHotkey, allows use of Caps Lock as the compose key, and bundles a whole lot of combinations from Xorg. In fact, it uses roughly the same configuration format by way of its res/compose.txt file, allowing you to add working configurations directly from an .XCompose file.
Ubuntu/Mint
The Ubuntu docs cover pretty well how to set up a Compose key in the first place. Essentially, it's in keyboard layout preferences.
The default behavior, which is to use the hardcoded combinations in GNOME, is pretty weak, and won't help if you want to add customizations. Overriding the input configuration to use "xim" takes care of this.
Set up an X Input Method (XIM)
New instructions
These instructions are only half-tested.
First, install uim. Then, use im-switch to change the X input method. Finally, restart your X session.
sudo apt-get install im-switch uim sudo im-switch
Original instructions
If the above doesn't work, the following might.
Add to .xsessionrc
:
export "GTK_IM_MODULE=xim"
Then log out and back in. Apparently it also might work to add the same env var before starting a program where it is to be used.
Some sources also say to install "uim", but that may not be necessary.
Additions to .XCompose
With xim set up, additions using ~/.XCompose will now be recognized. A template:
include "%L" # include default composes from locale # Allow typing capital omega as OM, Om <Multi_key> <O> <M> : "Ω" U03A9 # GREEK CAPITAL LETTER OMEGA <Multi_key> <O> <m> : "Ω" U03A9 # GREEK CAPITAL LETTER OMEGA # Default compose types outdated "micro sign" with mu # Replace this with proper Unicode letter <Multi_key> <m> <u> : "μ" U03BC # GREEK SMALL LETTER MU