Using Alt-Keys on Linux

This topic was published by and viewed 1770 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author

  • DevynCJohnson
    • Topics - 437
    • @devyncjohnson

    Computers are able to produce many types of symbols in text documents and text fields. Thanks to Unicode, numerous symbols and characters can be displayed for many languages. However, the average keyboard has the printable ASCII characters and possibly some Unicode characters (like the Euro symbol - "€"). Many Linux users (especially those in the office setting) may find it beneficial or interesting to know how to type additional characters with their standard keyboard.


    First, it may help to know some general information. ASCII provides a way to encode 128 characters using 7-bits. Some of these characters are not viewable/printable like the ASCII Control Characters. The Control Characters are the first 32 ASCII codes. For instance, the bell character makes the motherboard beep; the character is represented by "\b", "^G", or BEL. Most of the ASCII characters are printable and include many of the keys seen on standard English keyboards. Such characters include A-Z, a-z, 0-9, and many forms of punctuation.

    Notice that some symbols are not included in the ASCII set like the Euro symbol, Greek letters, Cyrillic letters, accented Latin/English letters, Asian symbols, etc. Thanks to Unicode, additional symbols and characters can be displayed. There are a few different Unicode standards (like UTF-8, UTF-16, UTF-32, and others). UTF-8 uses 8-bits to encode symbols while ASCII uses 7-bits. Therefore, Unicode can encode all of the symbols ASCII encodes plus more like accented letters, currency symbols, and various alphabets (like Greek, Cyrillic, Coptic, Armenian, Hebrew, and more). Obviously, UTF-32 can encode the most symbols since it uses 32-bits.


    Obviously, when typing, pressing the A key will produce an "a" and while holding Shift, the same key will make an "A". Pressing A and getting "a" is called a first-level chooser. When holding the Shift-key down, that is a second-level chooser. On most systems, AltGr or the Right-Alt key is the third-level chooser. For instance, press the 5 key to get a "5" (first-level). Press Shift+5 to get "%" (second-level). Finally, press AltGr+5 to get "€" (third-level). However, some systems may need to be configured to support the third-level.

    Shift and AltGr are examples of chooser keys since they allow a button to produce a different symbol. CapsLock is equivalent to Shift. However, Shift must be held down while CapsLock is pressed once to emulated the Shift key being held down.

    A fourth-level chooser exists, but many systems need to be configured for it. The fourth-level chooser is usually the third-level chooser (like AltGr) plus Shift. Some systems require that Shift be pressed first and then AltGr while still holding down Shift.

    On Ubuntu, go to the Keyboard-shortcut settings and go to the "Typing" section. Set a key to be the "Compose" key. Some users may want to choose the right-Ctrl or some other commonly unused key or key-combination. Then, users can press the Composer key once and then press ` and then "a" to produce "à". To type another accented character, the user must press the Composer key again. As another example, to type a pilcrow, press the composer key (or combination). Then, type Shift+P and then Shift+1. As a result, the user will have "¶".

    On many system, including many Linux distros, users can produce a symbol by typing the Unicode hex code/number. First, press Shift+Ctrl+U. Then, the cursor may change to a "u". After releasing the buttons, type the Unicode number. The hex sequence is case-insensitive. Once done, press Enter. However, if the user plans on typing another Unicode symbol, then press Shift+U instead of Enter and then type the next hex sequence.

    Alt-codes do not work on Linux. However, users have access to more symbols via the Shift+Ctrl+U method.

    NOTE: Unicode numbers and Unicode hex codes are two different numbers. Also, Alt-codes are different from Unicode hex codes.

    Links for Symbol Codes

    Further Reading

Viewing 1 post (of 1 total)