Ubuntu – Spanish accents on US keyboard


I have a good-old fashioned US keyboard. Looks like English (US).

How can I get Spanish accents on Ubuntu 12.04 ?

This article says I can use RightAlt + a but the aritcle goes only to 11.04. It also says something about dead keys, which don't seem to work.

Best Answer

You can also use the compose key.

This is a good option if you do not want to change your keyboard layout, which can bring other complications to your keybindings in various settings.

Setting the compose key in 12.04:

  1. Go to System Settings >> Keyboard Layout >> Options.
  2. Click Compose key position to expand the list of choices and select an option. A common selection is right alt.

Using the compose key:

compose key+'+a = á
compose key+-+n = ñ (that's a dash or minus)

The keys following the compose key can be in either orders, so you can also use the the following.

compose key+a+' = á
compose key+n+- = ñ

For keys requiring shift, you use shift as normal, but it is only needed once.

compose key+shift+?+? = ¿
compose key+shift+!+! = ¡

See the full Gtk compose table.