The Compose key is magic
66 points by ciferkey
66 points by ciferkey
I can confirm this, using the compose key has changed my typing life. Especially if you are bilingual with any Latin-alphabet language, I really recommend enabling it. I mapped it to CapsLock (and made Shift+CapsLock do what CapsLock did).
What the article fails to adequately emphasize is just how intuitive the key combinations are. It happens to me often that I think of some symbol that I rarely use, like ™ or ≈ or ±, and I can just guess exactly how to compose it.
You've probably guessed all three of those correctly on your first try. Once you grok the language of the compose key, it becomes fully natural.
I use https://github.com/kragen/xcompose and wish that more of these were "upstreamed".
There's a few "rules of thumb" to learn to get the most out of it, like <Compose> <*> ... is the prefix for greek (eg <Compose> <*> <A> is alpha), and <Compose> <\> is the prefix for combining charactors (eg <Compose> <\> <(> </> <)> is combining-crossed-circle), but as usual, if you try something there's a good chance it'll work.
It looks like some characters between <> have disappeared after your comment was rendered in Markdown. I theorize that the first was either * or _, but I can’t guess the second one.
We should be able to see the characters if you edit your comment to backslash-escape them (like <\*> or \<\*\>) or wrap the key combinations in backticks (like `<Compose> <*>`). You can use the Preview button to check the rendering before you submit.
What the article fails to adequately emphasize is just how intuitive the key combinations are.
Yup! The author uses e= for € but I've always used C= because I probably find it more intuitive and it worked the first time I tried it, and often the bindings work backwards too; =e and =C are both valid. I never have to struggle to remember how to write accented words because I can write them either way!
I love the Compose key. I have it mapped to the Caps Lock key on my machines. My .XCompose file includes "sf" for ¯\(ツ)/¯ and "tf" for (╯°□°)╯︵┻━┻. I learned about it later in life than I wish I had, but I'm glad I know now.
I used this when I had to use Windows:
I basically need to search for “eur symbol” somewhere and copy-paste it
Alternative solution: Use a better keyboard like English (intl. with AltGr dead keys. Besides áèçæöþð¿ etc you can arbitrarily attach diacritics: e.g. ẗ ƭ on t. This enables typing in most languages e.g. ţ for Romanian, ű for Hungarian etc. Russian (Polyglot and Reactionary) similarly allows қ а́ я́ etc. useful for Tajik and for marking stress. Linuxes have offered them by default for at least a decade.
Compose does seem really cool for extra fractions, e.g. my Latin keyboard only has: ¹²³ ¼½¾ and non-intuitively.
I like the EurKEY layout. It's usable on all platforms, while the compose key really only works nicely on Linux.
I would prefer to use compose key everywhere though, but I have yet to find a good solution for macOS.
I love the compose key so much. I use it on Windows and macOS too, and 95% of the time that I need to type a special character I can just guess what the compose sequence is and I'm probably right, and the other 5% I just add it!
My ~/.XCompose file:
# Import default rules from the system Compose file
include "%L"
<Multi_key> <t> <u> : "👍" # THUMBS UP SIGN
<Multi_key> <c> <m> : "✓" # CHECK MARK
<Multi_key> <b> <o> : "☐" # BALLOT BOX
<Multi_key> <b> <x> : "☑" # BALLOT BOX WITH CHECK
<Multi_key> <c> <a> : "🤸" # PERSON DOING CARTWHEEL
<Multi_key> <c> <l> : "👏" # CLAPPING HANDS SIGN
<Multi_key> <f> <e> : "⁂" # ASTERISM
My xcompose setup broke a while ago and I haven’t figured out why yet.
If you use applications installed from flatpaks, it may be a permission issue. I ran into that where Firefox on GNOME used my .XCompose additions just fine but Firefox on KDE didn't, and it was something to do with KDE's default Flatpak permissions disallowing access to the file. I'd have to look on that laptop to see what specifically I had to change, but you may be experiencing a completely different issue 😅.
Does this work with Weyland?
I think I was already on Wayland by the time I learned about the Compose key, and it's worked well in both GNOME and KDE on Wayland for me.
Wayland uses the same xkb that X11 does, so as long as your compositor allows setting the relevant xkb options it works
Learned something new today! I did not know about the Compose key feature before.
On the one hand I think it is nice to have such a general way to input all characters. On the other hand I would find it annoying that I have to remember the names of the parts that compose a character. I would much more like to have a searchable menu for this – a bit like the Emoji menu that GTK applications open with Ctrl + . , but a) with all symbols rather than just emojis, and b) available in all applications, not just in GTK ones. Then again it might be difficult to implement that feature in terminal applications, so maybe the Compose key is the lowest common denominator that works everywhere.
As others have noted, the Compose key ends up being pretty intuitive such that you rarely have to look up how to type something. Need a letter with a tilde on top? Type the letter and a tilde. Need that same letter with a couple dots above it? Type the letter and " (or something like that). You might have to try a couple combos the first time you need something, but then you'll gain muscle memory for anything you type often.