Sam Trenholme's webpage

Typing Spanish-language characters

This document describes how to get the accented Spanish-languages letters áéíóúüñÁÉÍÓÚÜÑ¡¿ on an English-language keyboard. This document covers Windows machines, Macintoshes, Linux machines using X windows, and the HTML escape sequences which represent the Spanish-language characters.

PCs running Microsoft Windows

These are a little tricky: Hold down the ALT key, and while holding down the alt key, type in the three (or four) digit number using the numeric keypad on the right hand side of the keyboard. After typing in the three (or four) digit number, release the ALT key

á: ALT + 160
Á: ALT + 0193
é: ALT + 130
É: ALT + 144
í: ALT + 161
Í: ALT + 0205
ó: ALT + 162
Ó: ALT + 0211
ú: ALT + 163
Ú: ALT + 0218
ñ: ALT + 164
Ñ: ALT + 165
ü: ALT + 0252
Ü: ALT + 0220
¿: ALT + 168
¡: ALT + 173

It is also possible to change the settings so that the keyboard is the same keyboard that Spanish-language speakers use. One this is done the spanish characters are obtained via two keystroke combinations, as follows:

áÁ: [ then aA
éÉ: [ then eE
íÍ: [ then iI
óÓ: [ then oO
úÚ: [ then uU
ñÑ: ;: (This is not a 2-keystroke combination, but merely the key to the right of L)

To get a Spanish keyboard:

Make sure you have the Windows CD handy; you may need it to add a new keyboard.

Start -> Settings -> Control Panel -> Keyboard -> Langauge -> Add

And add a Spanish(Mexico) keyboard.

At this point, there will be a Square in the lower right hand corner which says "En"; then can be clicked on, and one can then choose "En" or "Es"; use "Es" only for typing in áéíóúñÁÉÍÓÚÑ¡¿; all the puncutation on a keyboard changes when using a Spanish keyboard.

Another option is to use the Microsoft Keyboard Layout Creator to create a keyboard layout that allows one to type Spanish characters using special keystrokes. If one doesn't want to bother with this I have already created a special keyboard layout for Windows that uses right Alt+vowel to give you an accented vowel, right A lt+1 to give you ¡, Right Alt+/ to give you ¿, and Alt+h to give you ü.

Mac OS

Under "utilities", there is an application called "Key Caps" which shows that one uses the following two-key sequences to get the Spanish letters:

Ññ: Option + n then n
Áá: Option + e then a
Éé: Option + e then e
Íí: Option + e then i
Óó: Option + e then o
Úú: Option + e then u
Üü: Option + u then u
¡: Option + 1
¿: Option + ? (Option + shift + /)

Spanish characters on a CentOS Linux 8 machine

Go to Setup -> Region and Language -> Input source, click on "+", then on “English (United States)” and look for then add the following layout: “English (international AltGr dead keys)”

If using a non-standard Windows manager for X, this command will do the same thing:

setxkbmap us altgr-intl

Make this the default layout. Once that is done, to get Spanish accents:

Áá: Right alt + A
Éé: Right alt + E
Íí: Right alt + I
Óó: Right alt + O
Úú: Right alt + U
Ññ: Right alt + N
Üü: Right alt + Y
¡: Right alt + shift + 1
¿: Right alt + /
’: Right alt + 0
‘: Right alt + 9
“: Right alt + Shift + [
”: Right alt + Shift + ]

This is known to work in CentOS 8, which is supported until 2029. The method for getting Spanish accents may be different in other versions of Linux. Your mileage may vary.

Other stuff: Custom keymap file (may or may not work if placed in /usr/share/X11/xkb/symbols/ as us_es).

HTML escape sequences

First of all, if one wishes to have the Spanish-language characters in HTML documents that one is writing, simply use the following escape sequences. In other words, where there is a á in an HTML document, one will see a á in a web broswer.

Use the escape sequence that is below the letter in question; the top row is for upper case letters, and the lower row is for lower case letters.

¡ ¿ Áá Éé Íí Óó Úú Ññ Üü
¡ ¿ Á É Í Ó Ú Ñ Ü
á é í ó ú ñ ü
It is also possible to use the symbolic names:
¡ ¿ Áá Éé Íí Óó Úú Ññ Üü
¡ ¿ Á É Í Ó Ú Ñ &Uumt;
á é í ó ú ñ ü

Links