My first computer was an Acer C710 Chromebook. There were a lot of problems with it but one thing I always appreciated were its dead keys. Until a few days ago, I had completely forgotten what the feature was called. Once I figured it out, however, I was able to do some digging and find the answer fairly quickly.
Dead keys1 are actually a type of modifier, like
They allow people to type accented characters that don’t appear on their
keyboard. For example, I have a US keyboard and there is no enye (the
diactric2 mark over the ñ) as can be found on Spanish and Latin
I’m not exactly sure why but dead keys don’t have to be held down when you want to use them but they don’t; simply strike the dead key then the character you intend to modify and the resulting accented character will be rendered properly.
Dead keys allow writers to use far more characters that just the accented ones found in various alphabets. Indeed, one can type a very wide variety of symbols:
™ © ® § ¶ ∵ € ¢ ¥ ⅞ x³ ∞ ¬ ÷ ± × ≠ ♪ ♬ ♭ ♮ ♯ → ⇒ ☭ ㉔ ⓐ ß æ ø Œ
If you write code at all, enabling dead keys alone would be an
absolute nightmare. To get double quotes, you would have type
Space every single time. The same goes for
The compose key3 makes this much less of an issue. When struck, it
indicates that the next few keys (2 or more) are to function as dead
keys. With this enabled, you can write code without abusing your space
bar but also type résumé4 correctly.
I have found this absolutely invaluable in my German course. I am able to type something like Linux ist großartig without searching “eszet” and copying it from Wikipedia5.
How you enable dead keys or the compose key depends entirely on your operating system. I’m sure most Linux distributions that ship with a DE6 like GNOME, KDE, XFCE, etc. will have a GUI option in the settings. I use Arch Linux with i3-gaps and thus don’t have a GUI to manage these kinds of things. That’s where the Arch Wiki comes in.
Depending on whether you want dead keys or a compose key, there are different commands to run. I’m not sure how to enable the former—you’ll need to read the page for that yourself—but mapping an existing key to compose is really easy.
List what your options are
grep "compose:" /usr/share/X11/xkb/rules/base.lst
Copy which first column you want and paste it into this command
setxkbmap -option <option-goes-here>
I mapped mine to the right
Alt key as I never use it and it’s near the space bar. The command for that would simply be:
setxkbmap -option compose:ralt
For other interesting things you can do with your keyboard, check that whole section of the Arch Wiki. It’s really one of the best resources there is for this kind of thing.
Since the time of publication, I’ve started using
Wayland and configuring your
setxkbmap doesn’t work. Instead, assuming you’re running
sway, add something along this vein
to your config. If you want to use something other than your right
key, make sure you change that.
input type:keyboard xkb_options compose:ralt
They’re called dead keys because, with most keyboards and operating systems, there is no visual indication that it’s been struck; the key appears to be dead. ↩︎
Also known as a multi key ↩︎
DE is short for Desktop Environment. If you’re not familiar with the term, a DE is basically a suite of applications and programs that make up the interface a computer user interacts with. The dock on macOS, the start menu on Windows, your file manager, these are all examples of tightly integrated applications that provide the core functionality of whatever operating system you use. ↩︎