How to Quickly Type Special Characters in Linux

special-characters-linux-featured

From time to time you may find a need to type in special characters such as when writing in a foreign language that has accentuated letters or when using mathematical symbols for homework or reports.

Although your keyboard has many keys, many of these special characters will be missing. So how do you type them into your documents?

You can use the built-in Character Map application which is bundled with your Operating System or install an application such as GNOME Characters to find the character you want and then copy and paste from there, but this is bound to be slow and tedious, especially if you need to do this on a regular basis.

This article provides two ways you can quickly type special Unicode characters in Linux without the need for an external application.

Each Unicode character has a code point assigned to it. For example, the code point for the dollar sign character ($) is U+0024. The code point is the part after U+ which in this case is “0024.”

If you do not have this character on your keyboard and want to insert it into a document, press Ctrl + Shift + U on your keyboard followed by the 4 character code point, then press Enter to produce the output.

special-characters-linux-unicode

This method requires that you memorise the Unicode code points for the characters you type often. You can find the code points for some of the most important characters for English readers in this Wikipedia article.

Utilising a compose key sequence is a simple and fast way to insert a special character in Linux. Keyboards do not have a specific compose key built in; you’ll have to define one of your existing keys as the compose key.

To define a compose key in GNOME, you’ll need to have the Gnome Tweak Tool installed. You can install it in Ubuntu by typing the following command into the terminal:

Once it’s installed, launch it and select “Keyboard & Mouse” in the sidebar, then Click “Disabled” next to the Compose Key setting. Turn the switch on in the dialog and pick the key you want to use.

special-characters-linux-compose-1

Do note that any key you set as your compose key will only function as the one you designate and not the one originally intended.

Once you have set your compose key, you can type in any character by pressing the Compose key followed by the sequence required to produce that character.

You can find the compose key sequences for many common Unicode characters on this page.

For instance, the sequence for the copyright character © is oc. To insert this character, press the Compose key followed by oc.

Likewise, to type the degree sign °, hit the Compose key followed by oo.

Notice that the compose key sequence bears some resemblance to the actual character you want to insert and does not contain more than two characters which makes it a lot easier to commit to memory.

We have covered two quick ways to insert special characters into your documents in Linux. Don’t forget to tell us which method you prefer or other alternative methods in the comments section below.

10 comments

  1. As usual, the author assumes that Ubuntu == Linux and that GNOME is the only DE people use. The article is useless for anybody using other distros and DEs.

    • Yes I agree totally .. non-attentive people tend to lump everything together instead of:
      – linux is the kernel
      -gnu refers to all the base utilityes
      -gnome is a desktop environment
      -kde is another desktop environment
      -ubuntu may be popular, but its one of at least 100 other common distros.
      – they have different package managers and file system layouts

  2. My Gnome Tweaks does not have the Compose choice, and the EMACs is not a seperate choice, but in one of the other right side menus.

  3. Far TOO complicated! Just use the Character map and copy and paste!
    Need more?
    Check out onscreen keyboards!
    Of course it does depend on how often you need these characters, if you use them often then a dedicated keyboard, in the language that you are using, may be a better answer.

  4. The easiest and most straight-forward way to write special characters in Linux is to start the LibreOffice writer and then from the menu select Insert->Special Character… From the dialog box that appears you can select any possible character. Select the desired character(s) and then press the button Insert. From the LibreOffice writer document you can copy and paste them anywhere.
    If you want to write larger chunks of texts containing special characters (let’s say Greek or Cyrillic letters), this method is not very convenient. Instead, install an additional keyboard and define e.g. Alt+Shift to be the keyboard sequence that will switch keyboards. Now if you want to write Greek letters just press Alt+Shift. Press it once again to switch back to English. For example, the Greek letter beta is: β.
    A further method to insert special characters into pdf or html documents is LATEX. In LATEX each special character has its own symbol, for example, the degree sign is circ (to be written as a superscript) and the infinity sign is infty.

  5. I have used the Compose key technique for a number of years and usually have no problems. On Fedora 26 + KDE, this time I was unable to assign either Windows key as the Control key, and couldn’t figure out how to shutoff the default behavior. I ended up using the Scroll Lock key instead.
    Using Insert -> Special Character is very cumbersome.

  6. From what I’ve seen, using English, French, or German seems to be easiest.
    Not sure about Spanish, Dutch or Italian … and then there’s Africa and Asia which is a whole other ball of wax.

Comments are closed.

Sponsored Stories