Compose Key Sequences for Useful Unicode Characters

If you activate a Compose key on your keyboard:

Compose key selection

Compose key selection

Then you can insert Unicode characters without memorizing their hex values. Of course, you must memorize the Compose key sequences. Fortunately, they’re more-or-less mnemonic for the ones I occasionally use, which are hereby cherrypicked from that list.

Press-and-release the Compose key (right-Win), then type the characters as shown to get the symbol in quotes:

  • o c “©” copyright # COPYRIGHT SIGN
  • o o “°” degree # DEGREE SIGN
  • o r “®” registered # REGISTERED SIGN
  • t m “™” U2122 # TRADE MARK SIGN
  • s m “℠” U2120 # SERVICE MARK
  • . . “…” ellipsis # HORIZONTAL ELLIPSIS
  • . – “·” periodcentered # MIDDLE DOT
  • . = “•” enfilledcircbullet # BULLET
  • + – “±” plusminus # PLUS-MINUS SIGN (∓ MINUS-PLUS is U2213)
  • x x “×” multiply # MULTIPLICATION SIGN
  • < < “«” guillemotleft # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
  • > > “»” guillemotright # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
  • c / “¢” cent # CENT SIGN
  • – – . “–” U2013 # EN DASH
  • – – – “—” U2014 # EM DASH
  • < – “←” U2190 # LEFTWARDS ARROW
  • – > “→” U2192 # RIGHTWARDS ARROW
  • = > “⇒” U21D2 # RIGHTWARDS DOUBLE ARROW
  • ? ! “‽” U203D # INTERROBANG
  • p o o “💩” U1F4A9 # PILE OF POO
  • m u “µ” mu # MICRO SIGN
  • d i “⌀” U2300 # DIAMETER SIGN
  • 1 4 “¼” onequarter # VULGAR FRACTION ONE QUARTER
  • 1 2 “½” onehalf # VULGAR FRACTION ONE HALF
  • 3 4 “¾” threequarters # VULGAR FRACTION THREE QUARTERS
  • 1 1 0 “⅒” U2152 # VULGAR FRACTION ONE TENTH (and similar)
  • ^ 1 “¹” onesuperior # SUPERSCRIPT ONE (also 0 2 3 + -…)
  • _ 1 “₁” U2081 # SUBSCRIPT ONE (also 0 2 3 + -…)
  • e ‘ “é” eacute # LATIN SMALL LETTER E WITH ACUTE
  • e ` “è” egrave # LATIN SMALL LETTER E WITH GRAVE

Producing Greek letters requires a “dead_greek” key, so it’s easier to start with bare hex Unicode values at U0391 (Α) and U03b1 (α) and work upward until you find what you need:

  • U03a9 Ω uppercase omega
  • U03c9 ω lowercase omega
  • U03c0 π lowercase pi

Odds and ends:

  • U2245 ≅ approximately equal

If you set the keyboard layout to US International With Dead Keys, maybe you (definitely not I) could remember all the dead keys.

Advertisements

  1. #1 by Frans on 2016-11-16 - 10:25

    I use US International with AltGr dead keys combined with the compose key. That way characters like é, ï, ç, ß and the like are easily accessible. It’s probably more important for me as a Dutch person who at least semi-regularly types four languages, although usually only two or three. But in any case several accented characters are also important in Dutch, even if ç and ß aren’t.

    You’ve already mentioned about all the compose key sequences that I use, but I thought these were missing:

    <, ‘ makes ‘ (and > for ’)
    <, ” makes “ (and > for ”)

    I’ve always found http://web.archive.org/web/20140311204348/http://www.hermit.org/Linux/ComposeKeys.html perhaps more useful than looking in the actual keyboard configuration file.

    I’m pleased to report that my compose key doesn’t produce any idiotic poo. What I miss is some kind of easy IPA typing without resorting to one of the various solutions like http://ipa.typeit.org/ (however nice that may be). Admittedly I’ve never missed it enough to investigate properly.

    Btw, I prefer to use Caps Lock as Compose.

    • #2 by Ed on 2016-11-16 - 16:24

      semi-regularly types four languages

      That definitely shows of the limitations of current keyboards; that, and Chinese all by itself.

      I need a few Greek letters for engineering units and the occasional odd symbol, nothing more. At least they’ll be easier to find now.

      And, yeah, the poo is idiotic; I had to include that sequence when I saw it in the table. Surprise: the glyph appears in the browser font! It’s not in my console font, though, where it renders as a simple lowercase o.

      • #3 by Frans on 2016-11-17 - 14:27

        Chinese characters don’t show the deficiencies of keyboards so much as of the Chinese writing system. (See, e.g., here.)

        I don’t consider AltGr a limitation at all. I can very effectively type my four languages. :)

        Now if you want to type Cyrillic or some such it would be a little bit more complicated because you’d have to learn and switch layouts.

  2. #4 by scruss2 on 2016-11-17 - 12:15

    Compose key handling is very variable; some systems use stock settings, others are custom, others make it harder than it needs to be. To make it work across more programs, you should set GTK_IM_MODULE=xim. The settings typically live in /usr/share/X11/locale/en_US.UTF-8/Compose (even if your language isn’t en_US), but could also be in ~/.XCompose

    There are also many custom versions on github, perhaps the oldest being https://github.com/kragen/xcompose

    • #5 by Ed on 2016-11-17 - 14:11

      Oh, no, you don’t! I am not messing with the X input magic, lest I become crunchy and go well with ketchup.

      Turns out there’s no “.XCompose” to be found anywhere on this XFCE box. That the Compose key still works fine suggests there’s much more going on under the hood than any one person (particularly this one) can comprehend. [heavy sigh]

      • #6 by RCPete on 2016-11-17 - 21:34

        I’m learning the quirks of XFCE on the old Vaio box. Still trying to find how to set what program is activated when you double click on a .foo extension file. (I really don’t want the Gimp handling a .pdf file; xpdf works better, thankyouverymuch.) man -k pdf and online searching hasn’t been all that helpful, so far. I’m thinking of setting up God’s-Own-Grep to see what I can find…

        As an aside, I learned of some new, not-quite obsolete machines on Dell’s pre-black-Friday-sale promotion. Ordered a 15″ Inspiron i3; 500gig HD, 4 g RAM (wanted 8, will upgrade when I know what to buy), all for $329 with shipping. It’ll be my first modern machine on Linux (Slackware, so far.) I was going to spend that or more on an offlease, so this looked attractive for my needs. That will be my on-the-road machine, and will let me get stuff to/from the barn/shop via sneakernet.

        • #7 by Ed on 2016-11-18 - 08:48

          how to set what program is activated when you double click on a .foo extension file

          I don’t know where the master association file lives, but you can set ’em one by one, which may be Good Enough.

          Fire up Thunar (the file manager) and other-click on a file name to get a list of things-to-do. The first option fires off the default program and the second option (“Open With”) gives you a menu of possibilities. Click “Open With” and select the last entry (“Open with other application …”), pick whatever program you like, check the “Use as default for this kind of file” box, and you’re all set.

          Not what I’d call obvious, fer shure!

          • #8 by RCPete on 2016-11-18 - 10:49

            I’ll give that a try. IIRC, I tried right-clicking on the application, and it launched as normal. Doesn’t help that the Vaio is a bit underpowered for the job…

          • #9 by Frans on 2016-11-18 - 11:02

            I think it’s probably ~/.config/mimeapps.list.

            • #10 by Ed on 2016-11-18 - 11:43

              Close!

              Given a big enough clue, I found /home/ed/.local/share/applications/mimeapps.list, but I’d rather not hand-edit that thing, even to make block changes, for fear of wandering off into the bushes.

              Linux configuration has become quite a mess. Selah.

            • #11 by Frans on 2016-11-18 - 12:19

              Hm, the one in ~/.local isn’t a thing on my Xubuntu laptop. (That is to say, it exists but is empty. It’s the one I mentioned that reflects my preferences.)

              Personally I think the current system works well enough. And heck, even the worst plain text files usually beat the Windows registry imo. ;)

            • #12 by Ed on 2016-11-18 - 14:16

              If only there were one “system”! It seems we have multiple overlapping layers of configuration files, scattered in a wide variety of locations, with overrides tucked away in other places.

              For example, I got used to finding system config files in /etc, but now the master copies live in /usr/local; some of them, I think, anyway. Then dot-files moved from ~ to ~/.config and now, apparently, to ~/.local.

              I’m sure it’s a “system”, but in a sense of the word I had previously not encountered… [mutter]

            • #13 by Frans on 2016-11-18 - 16:03

              Just tossing config files in ~ is a Bad Thing™ if you ask me. (Incidentally, that was Compose, t, m.) I despise having to disable display of hidden files because of all the ~ pollution which should just go into ~.config, which I think is a terrific idea. ~/.local is good enough as well imo, see the spec here: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

              ~/.local/share is for “user specific data files”. Some developers seem to have misinterpreted this to mean configuration, but it’s meant to be analogous to /usr/local (for that see http://refspecs.linuxfoundation.org/fhs.shtml). That means stuff like binaries, libraries, and icons. Not configuration, although in the sense of default configuration I suppose there could be some overlap with /etc. User configuration overriding the default configuration should go in ~/.config.

              In any case, over two decades of using Windows I’ve almost never been able to find what I’m looking for in the Windows registry. I’ve generally had much better luck in Linux. I suppose that’s damning by faint praise, but the more ends up in ~.config the better. :P

            • #14 by Ed on 2016-11-18 - 17:38

              Just tossing config files in ~ is a Bad Thing™

              Sure, let’s use another directory. No, let’s use many other directories, with the total number being roughly the product of the number of desktop environments times the number of major distributions! That should solve the problem! [sigh]

              Now, of course, we’re relentlessly moving system config information (and maybe everything else) from text files into the systemd, which is an entirely different kettle of, uh, stuff…

            • #15 by Frans on 2016-11-19 - 04:15

              True, logically it would probably make more sense if .config were a subdirectory of .local or maybe vice versa. I have no idea how it grew to be this way; it was this way when I got here. :P But aren’t you exaggerating the problem a little bit? For me almost everything resides in .config these days besides a bunch of imo annoying stuff like .firefox and .qalculate, which, yes, I think should move over into .config already. Stuff that can be found in .local/share is e.g. fonts, icons, paint brushes, etc. which makes sense because they aren’t configuration but “user data”. I suppose you could argue about whether or not they should be split up, but I think the documents I linked clearly explain the system behind it. That there are a few deviant programs that stick to ~ or put some inappropriate stuff in .local/share is a pity.

              I suppose my perspective is a “hallelujah this is so much better than that mess I was used to on Windows!” angle, while, if I’m reading you correctly, your vision is better summarized as “Linux used to be better in the ’90s.” Although I have to say I still don’t understand what one might like about the proliferation of configuration files in the home directory. ;)

              Now systemd I don’t like. I can’t even figure out how to read the logs without doing an Internet search. Much like the Windows registry. I want text files, and preferably not in an XML or JSON format either. I think that the “omg, everything is a text file!” eureka moment is probably one of the defining aspects of Linux for anybody first playing around with it or some other Unix-like system.

            • #16 by Ed on 2016-11-19 - 09:03

              besides a bunch of imo annoying stuff like

              I rest my case! [grin]

              Stuffing all the (text!) config files into ~/.config makes perfect sense: I’m highly in favor of it. Now, let’s have everybody actually do that and move on.

              I want text files, and preferably not in an XML or JSON format either.

              A-men!

              IIRC, Linux really wasn’t better in the 90s and there’s no way to herd all the code-writing cats in one direction, but discovering that everything I (think I) know has become obsolete every time I update a system tends to produce a certain lack of enthusiasm for The New Shiny.

              That’s a diagnostic sign of incipient Olde Farte-ism, of course…

            • #17 by Frans on 2016-11-19 - 09:47

              I agree. But my random Linux issues evaporate into insignificance compared to Windows 10 killing itself for unknown reasons. I now suspect it might be because I transplanted a BIOS-booting Windows into an EFI-supporting motherboard, but

              a) That was because years ago Windows insisted on no GPT on a BIOS motherboard… and I recently learned it insists on the opposite on an EFI motherboard.
              b) Windows ran fine for half a year before it pulled the trigger. Wouldn’t do anything. Even a repair install fixed nothing.

              Linux doesn’t care. It basically just runs no matter what you do. My current install has migrated across several motherboards, HDDs and SSDs.

            • #18 by RCPete on 2016-11-19 - 17:58

              I still have GWX control panel on my desktop, in case MS really decides to pull another Windows 10 bit. The Dell laptop that’s coming Real Soon Now will be my crash-test-dummy for the latest version of Slackware; trying 64 bit this time. If all goes well, we’ll keep one laptop as a Token Windows Box, kept offline, and in Woody Leonard’s Group C (never update, nohow), aka Group W (for the Arlo Guthrie fans). For the latter, I have to fiddle with the DNS to keep it from the ‘net, while using a HOSTS file to let it find the printer.

              I’ve been spending the better part of today getting Malwarebytes Antimalware and Microsoft Security Essentials from going after each other’s throats. MS did an update, you see… I’m trying to go back to my old days: “I support computers, but I don’t do Windows.”

              BTW, Get Off My Lawn! [grin]

              PS: mucking with properties in a pdf file got Xpdf to be the dafault for all pdf files. Last I heard, Slack hadn’t succumbed to the temptations of systemd. I hope.

  1. Unicode Keyboard Flameout and Workaround | The Smell of Molten Projects in the Morning