44

In Windows, we can use Alt+Keycode (for example, 130) to get an e acute, but it does not work this way in Ubuntu/Debian.

Is it possible to have the same keycodes work in Ubuntu?

Zanna
  • 70,465
JonYork
  • 583
  • Another way to achieve this is to change the keyboard layout to something with AltGr dead keys. For example witth USA keyboard with AltGr dead keys right-alt + a prints á (a with a acute) and right-alt + shift + s prints § (section mark). – HMM Mar 31 '11 at 14:02

3 Answers3

47

First hold Ctrl+Shift, then tap U and let go. An underlined "u" will appear, to which you can append a combination of characters. Hit enter after that and the new character will appear.

For instance, if I hold Ctrl+Shift and hit U, type e+9, then hit enter, an é appears. If I hit e+8 instead, an è does instead.

You can find the correct combinations using the Character Map program in Accessories. The first "0" or two that you find on certain entries can be dropped (e.g. a ç is listed as 00E7, but you only need to type the e7).

It's a bit odd coming from using the Alt method in Windows, but you'll acclimate quickly.

N.B.: If you need to frequently type many types of accented characters see Adam Byrtek's answer below for a nice method that, while it requires some setting up, can save a lot of time in the long run.

Fern Moss
  • 8,785
  • 6
    Just to mention, as it may be a new concept to some: This Ctrl+Shift+U + method allows you to enter any Unicode value.. ie. any of the range of global alphabets (of course you must have the appropriate font installed, but many are already in Ubuntu).. You can find the complete listing of all Unicode values (called Code-points) here http://www.fileformat.info/info/unicode/block/index.htm ... The Unicode ecnoding method used in Ubuntu is UTF-8... A Code-point is the Unicode value which UTF-8 encodes... The Ctrl+Shift+U method uses Code-points – Peter.O Mar 31 '11 at 12:08
27

Configure the compose key, press it to enter the compose mode and type e' to get "é". The mappings are very intuitive, so you don't have to learn them by heart. For example, it's easy to infer that in order to get "ü" you should type u" in the compose mode.

Adam Byrtek
  • 9,811
  • Actually, I really like this. I used to use the compose key with the accent, then type the letter itself, but I found that it was not working so well all the time, But your way seems to work better. +1 for your answer. – jfmessier Jul 19 '11 at 12:27
  • If you use accented characters often, this is the way to go (despite my own answer, ha). – Fern Moss Apr 26 '13 at 02:11
0

I found a workaround which hopefully is more universal since compose key does not exist in my very old version of ubuntu, plus my keyboard does not even have a physical compose key.

The technique is simply switching languages for your keyboard. The new language keyboard does have keys and combos for inserting special characters already built-in.

Therefore, simply:

  • Add the new language in settings: Region & Language (if you cannot find your language click on the three dots, other, more, etc and new languages should show in the list).
  • Switch between languages either from the top bar or using the default shortcuts for keyboard switching Super+Space or Shift+Super+Space (Super is the Windows Symbol Key)
  • Finally apply the key or combo for that special character.

Say you want to add Spanish accents and you have a US American keyboard then the combo should be '+vowel (obtaining á,é,...). Lastly, switch back to your language.

  • Answering a 12 plus year old question is not a good idea. The steps you suggest may not have existed today, As well it is many versions of Ubuntu later there is probably no such issue now. – David Apr 03 '23 at 07:20