I sometimes need to type "alt codes" to get symbols and on linux, it can be inefficient to use shift+ctrl+u then type the code, for example shift+ctrl+u+00a7 for § when on Windows it's alt+21.

So what I'm asking is, is there any way to basically use alt+... for these symbols as I don't really like using shift+ctrl+u and it doesn't work in some places.

I use xfce4 as my desktop environment and under the keyboard settings, I've seen something called a "compose key." As I didn't know what this was, I looked it up and saw it kind of had something to do with these unicode characters.

I've also seen somethings along the lines of level 1, 2, 3 and 4 keys but I don't really understand how these work, so if someone could explain these as well, that would be great.

(I use arch (manjaro more specifically) if this helps)

  • I am curious about the meaning/origin of your username "bytesnottights". I mean, I guess I sometimes handle bytes, and yet I happen to be wearing tights right now... :-) – Celada Jan 10 '16 at 21:38

You can use Compose s o (as well as a few other synonymous sequences) to obtain the character §. This is both shorter and more mnemonic than Shift+Ctrl+u a7 enter (you didn't mention pressing Enter but I had to do that do get it to work for me). The compose sequences are meant to be easy to remember, such as + - for ± or e ' for é. IMHO that's certainly better than having to remember Unicode code point numbers!

You can find the list of compose sequences in the various Compose files in /usr/share/X11/locale. Check out /usr/share/X11/locale/en_US.UTF-8/Compose in particular which appears to contain one of the biggest collections. Note that you will see Multi_key in that file, which is the "official" X11 name of the key more commonly known as Compose.

Sorry, I don't know anything about alt+... which you mention. Personally, compose sequences meet all my needs for typing English, French, and occasional special symbols (but not Japanese, of course).

I've also seen somethings along the lines of level 1, 2, 3 and 4

I don't know what that means, but maybe it refers to the length of the compose key sequence? Not all of the sequences are two characters. Some are 3 characters long: Compose - - - results in — (mnemonic: 3 hyphens because an em-dash is very wide) and I guess some are even longer (though I don't know any of those offhand).

| improve this answer | |
  • This post just saved me a lot of time. :) – bytesnottights Jan 11 '16 at 7:45
  • 3
    What exactly is the "compose" or "multi_key" key? (Windows keyboard here) – rugk Oct 12 '16 at 14:51
  • (a little dismayed to learn that such a thing as a "Windows keyboard" exists — so, like, apparently now keyboards are operating-system-specific?) Few keyboards these days have physical keys labelled Compose, but since a compose key is much more useful than a second Alt key or a second Meta key, many people map one of those less-than-useful redundant keys in the bottom right corner to Compose. You can easily find instructions on the Internet on how to do that, both using the command line (setxkbmap for temporary changes that aren't saved, etc...) and GUI settings. – Celada Oct 13 '16 at 19:51
  • 1
    “I don't know what that means, but maybe it refers to the length of the compose key sequence?”—No. “Levels” are things like the “base level” (no shift) and “shift level” (shift level activated/caps lock active). The US standard layout has only these two levels. Many European keyboards have three levels or more. Xkb allows for up to eight levels. – Guildenstern Mar 14 '19 at 19:36
  • 2
    Celada, what is the compose key? I've never seen this on any of my UK English or US English keyboards. Are you using an old keyboard from a VT200 terminal or some old DEC or Sun Systems keyboard? – Andrew S Mar 27 '19 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.