Linux alternative to alt+numpad codes

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)

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x