Linux alternative to alt+numpad codes

15,812

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).

Share:
15,812

Related videos on Youtube

bytesnottights
Author by

bytesnottights

Updated on September 18, 2022

Comments

  • bytesnottights
    bytesnottights over 1 year

    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)

    • Admin
      Admin over 8 years
      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... :-)
  • bytesnottights
    bytesnottights over 8 years
    This post just saved me a lot of time. :)
  • rugk
    rugk over 7 years
    What exactly is the "compose" or "multi_key" key? (Windows keyboard here)
  • Celada
    Celada over 7 years
    (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.
  • Guildenstern
    Guildenstern about 5 years
    “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.
  • Andrew S
    Andrew S about 5 years
    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?
  • questionto42standswithUkraine
    questionto42standswithUkraine over 2 years
    "(you didn't mention pressing Enter but I had to do that do get it to work for me)" saved me. I just did not expect that in Unicode Code Point, for example an underlined written u3251 resulting from Ctrl+Shift+u+ 3251 on the numpad really turns into a circled 21 after pressing enter (draw.io, LibreOffice Writer, ...), at first I thought, it would not work, since I did not know that an Enter is needed.
  • Admin
    Admin almost 2 years
    The compose key is whatever key you set it to; typically it's the Windows key, but you can set it to be another one if you want. Consider the Compose key to the be the Super key.