Linux has 3 ways to insert special characters – the ones that aren’t on the keyboard – and I’ll describe the best one last. For anyone who used to type Alt-0189 to get a “½” symbol in Windows, this post will tell you how to achieve the same result in Linux.
The first way is the character map(kcharselect in KDE), an applet that lists every character.Conceptually, this is the easiest, just find the symbol you want,then cut and paste. In practice, if you need to enter a lot of special characters, it’s pretty clunky. (In LibreOffice, as with MS-Office, it’s integrated in the menu as Insert -> Special Character.)
The second way is conceptually similarto Windows, except that you need to memorize unicode instead ofASCII. Hold down Control-Shift while typing the code: The letter “u”followed by 4 hexidecimal digits. For instance, while holding down Shift-Control, type “u222b” and release, to get ∫ (the mathematical operator for integration). The nice thing about unicode is that you can access more symbols than with ASCII, but it’s a lotto memorize. When you look up a symbol on the character map, you’ll see its code displayed, so you can commit it to memory if you’ll be using it a lot.
I mentioned these ways first because they always work. The easy, fun way to enter special characters inlinux is with the compose key, and it works for lots of commonly used symbols but not everything. It’s built into X so it works with every desktop environment, but it’s not enabled by default. You have to decide which key is the compose key, first, and be warned that it will no longer do what it normally does. Some people like CapsLock,because they can get capital letters with the Shift key anyway. I’m experimenting with the Alt key on the right side of the board (leaving the one on the left side to do what Alt usually does). You’ll find the setting near where you determine the keyboard layout in your GUI of choice (Configure Desktop => Input Devices => Keyboard =>Advanced tab, for KDE).
Once you have a compose key, press itand release, then enter 2 to 4 other characters to get the symbol you want. What’s so great about this method is that the characters you enter at this point are way, way easier to remember than unicode or ASCII. For the most commonly used symbols, they’re easy to guess (that’s the fun part).
If a symbol looks like a combination oftwo ordinary letters, then the keys you need are probably those two.For instance, compose-key plus “x” plus “o” yields this: ¤.I’ll use it as a symbol for the compose key in a few more examples:
¤ 1 5 → ⅕
¤ e ’ → é
¤ e ^ → ê
¤ n ~ → ñ
¤ c , → ç
¤ o “ → ö
¤ A E → Æ
¤ t m → ™
¤ o r → ®
¤ L = → ₤
¤ - : → ÷
¤ = / → ≠
¤ % o → ‰
¤ - > → the arrow I’ve been using here. See how intuitive the combinations are? If the symbol you want looks like an ordinary symbol in a different position, try doubling up:
¤ x x → ×
¤ o o → °
¤ s s → ß (OK, that one’s actually the symbol for a double-s in German.)
Try it; it’s easy, much better for yourrhythm than using the character map. You can find cheat sheets of the most commonly used characters, or you can look in/usr/share/X11/locale, find the subdirectory for your language (in my case en-US.UTF-8) and then open the config file named Compose. There are thousands of combos, but not every unicode symbol. For instance,the integral operator I mentioned above isn’t there, but the format is easy to figure out, so I added these lines to the file:
<Multi_key> <i> <n> <t> : "ʃ" U222B # INTEGRAL OPERATOR
<Multi_key> <i> <n> <2> : "∬" U222C # DOUBLE INTEGRAL OPERATOR
<Multi_key> <i> <n> <3> : "∭" U222D # TRIPLE INTEGRAL OPERATOR
<Multi_key> <i> <n> <4> : "⨌" U2A0C # QUADRUPLE INTEGRAL OPERATOR
So now, I just remember “int” is short for integral, and type ¤int to get ʃ. Just make sure that any new ones you come up with aren’t already in use. If you have ideas for more, please post them here.
GEF
Moderators: If a “how to” on this subject has already appeared, and I somehow missed it, then I apologize for the duplication and ask you to delete my post.