42

After enabling my Compose key, I want to find the list of all the key combinations I can use to create special characters. Where is the full list that my system is using when parsing the keys typed after the Compose key?

I know about things like ë(e"), °(oo), and ‽(!?), but there are surely many more. Everything I've found online seems out of date or incomplete. I would expect the full list to be locale-specific too.

muru
  • 197,895
  • 55
  • 485
  • 740
Kees Cook
  • 17,473
  • In case you did not know, you can get any Unicode character you want, by pressing Ctrl + Shift + U, followed by a hexadecimal number – Lekensteyn Apr 13 '11 at 19:53
  • That hermit.org link is down. Here's a copy: https://tstarling.com/stuff/ComposeKeys.html – wjandrea Apr 06 '20 at 23:47

2 Answers2

49

The full list of key combinations is available on the local filesystem here:

/usr/share/X11/locale/en_US.UTF-8/Compose

Everything that starts with <Multi_key> is a Compose key combination.

You'll find a lot of multi-number combinations producing stuff like:

  • 34 as ¾
  • (10) as ⑩

And there are some fun (nearly easter egg) things in there too, including:

  • :) as ☺
  • <3 as ♥
  • CCCP as ☭

etc...

Kees Cook
  • 17,473
  • mind = *blown* ; ♥ = <Multi_key> <3> – daithib8 Apr 13 '11 at 20:04
  • that file doesn't appear to cover all the characters that are available in gucharmap ( character map). Tip: by switching the view to unicode block many types of characters are revealed . Many are available as part of Deja Vu font. – daithib8 Apr 13 '11 at 20:24
  • Right, it doesn't cover all the unicode characters -- there are full references of that in lots of places. I was just curious about the Compose-key combination list. – Kees Cook Apr 13 '11 at 21:55
  • 1
    That's not the right path necessarily. For me, $LANG == en_AU.UTF-8, and the path doesn't exist. However, I can find the true path using strace -e open xterm |& grep Compose (i.e. at /usr/share/X11/locale/en_US.UTF-8/Compose). – Sparhawk Oct 04 '13 at 06:19
  • To find the right path without strace, open /usr/share/X11/locale/compose.dir and look for your locale there, to see what file it maps to (prepending /usr/share/X11/locale/ to it). Most UTF-8 locales map to en_US.UTF-8/Compose but some (e.g. Greek) don't. – Pedro Gimeno Aug 05 '16 at 18:55
  • This page seems to have most (but not all; it seems the list may have been updated since) of the available combinations. – Abbafei Jan 24 '19 at 05:59
  • 2
    What are those keys? <Multi_key> <U2193> <U2395> – pihentagy Jun 07 '19 at 12:43
  • How is “nearly [an] easter egg”? Smiley faces are used all of the time in informal communication. And sometimes you really want a full smile, not that :slightly_smiling_face: that some applications replace :) with. :) (an related faces) are used a ton more than ¾ or . – Guildenstern Dec 08 '19 at 13:28
  • @pihentagy That's ↓ and ⎕ combining to make ⍗. The first is just a normal downwards arrow, but the two boxes are special characters used for the APL programming language. APL programmers sometimes have a special keyboard layout, so they may actually have keys for these symbols. Uxxxx generally is the Unicode code point xxxx (in hexadecimal). Often on Linux you can do Ctrl-Shift-U and then type in the codepoint to get it directly, but I've found this doesn't work in every situation. Compose sequences are much easier to remember, but don't cover every character. – LeopardShark Nov 25 '21 at 19:12
1

This answer adapted from Adapted from How to list all currently available compose key combinations?

less "/usr/share/X11/locale/$(grep -m1 "${LANG%.*}.UTF-8\$" /usr/share/X11/locale/locale.dir | cut -d/ -f1)/Compose"