Is there a universal way to write Unicode characters?

Either you can enable an Compose key, or you can press CtrlShiftU followed by the Unicode hexadecimal number of the character (leading zeroes can be skipped). For example, Æ is CtrlShiftU, then C6. This works on GNOME Terminal, Terminator, Google Chrome and a number of other applications, with Xterm (and according to comments, Emacs) not working.

On GNOME, to enable Compose, go to the Keyboard settings, then ShortcutsTypingAlternative Characters Key and map it to something (say, Right Alt). Then you press the Compose key, and - thrice to get an em-dash: —. (The arrows in this paragraph are all Compose->.)

enter image description here


The best way is still to type the character on your keyboard. Thanks to XKB, you can bind arbitrary Unicode characters to key combinations. For instance, with user XKB customization, I can type directly: ← → ↑ ↓ … € ½ « » — − ± ≠ ∩ ∪ ⊂ ∧ ∨ ∀ ∃ √ ∞ ≤ ≥, etc.

Note: in the particular case of GNU Emacs, Unicode composition can be done via Ctrlx+8+Return. See Ctrlx+8+Ctrlh for additional methods.

"Unicode input" on Wikipedia gives information about ISO 14755 Unicode input depending on the context, in particular for X11 with some toolkits and for specific applications (Emacs, Opera, Vim).

Alternatively, you can use the Compose key with user-defined settings (as the default settings are far from being complete). Documentation is provided by the Compose(5) man page. For instance, write a file $HOME/.XCompose containing:

include "%L"
<Multi_key> <bracketleft> <c>           : "⌈" U2308 # LEFT CEILING
<Multi_key> <bracketright> <c>          : "⌉" U2309 # RIGHT CEILING
<Multi_key> <bracketleft> <f>           : "⌊" U230A # LEFT FLOOR
<Multi_key> <bracketright> <f>          : "⌋" U230B # RIGHT FLOOR

The include "%L" line first loads the default (locale-specific) Compose file, and the next four lines add user-defined settings, such as: Compose+[+c gives the left-ceiling character "⌈" (U+2308).


As described in detail in this post, there's a great way to do add unicode keys without having to remember any awkward key combinations or use any drop down menus.

It boils down to using Autokey, which can take any set of key strokes as a trigger to run a script or paste a phrase. In this case, your phrase is simply the unicode character you want.

As the post describes, a good way to do it is to follow LaTeX, but with a forward slash rather than backslash. For example, typing /delta anywhere (browser, libre office, etc) will automatically get converted to δ.