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 aATo get a Spanish keyboard:
éÉ: [ then eE
íÍ: [ then iI
óÓ: [ then oO
úÚ: [ then uU
ñÑ: ;: (This is not a 2-keystroke combination, but merely the key to the right of L)
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.
There is also a proprietary program for Windows which makes typing Spanish accents easy. It costs only 10 dollars; 10 dollars more than the equivalent Linux solution, mind 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
Spanish characters on a Linux machine
(If you do not know what "Linux" is, or think it is a kind of table wear, ignore this section)On a modern system running X, the following ALT sequences may (or may not, depending on whether you are using an 8859-1 or UTF-8 Xterm, whether you are using the left or right ALT key, or whether the window manager or application you are using traps ALT keystrokes) give you the appropriate Spanish-language letters:
áÁ: Alt + A
éÉ: Alt + I
íÍ: Alt + M
óÓ: Alt + S
úÚ: Alt + Z
ñÑ: Alt + Q
¡: Alt + Shift + 1
¿: Alt + Shift + /
Üü: Alt + \
If that does not, use this keyboard definition, which allows Alt+AEIOU to give accented vowels (áéíóú), ALT+N gives us a ñ, and Alt+H gives us ü. In addition, one gets ¡ with Alt+1 and ¿ with Alt+/
To use this keyboard definition:
- If you are using XFree86 4.x, or the new X.org X server (in other words, if you are using a modern distribution of Linux) Place this file in /usr/X11R6/lib/X11/xkb/symbols/pc/ with the filename us_es. Note: This file does not work with newer version of X.org without modification. This appears to be a case of programmers needlessly tweaking code where it should not be tweak (An all-too-common problem with open source software). Here is an updated keymap file which may need some modification to work with your system. Also note that the above directory is different with some Linux distributions; again, needless tweaking from open source developers.
- Locate the file named xorg.conf on your system. On Fedora systems, this file is placed in the directory /etc/X11
-
Change the keyboard you use in X to use a "us_spanish" keyboard. I do
this by editing the xorg.conf file by hand. For versions 4 of XFree86,
edit the file so that one has a line like this in their XF86Config file:
Option "XkbLayout" "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.
| ¡ | ¿ | Áá | Éé | Íí | Óó | Úú | Ññ | Üü | |
| ¡ | ¿ | Á | É | Í | Ó | Ú | Ñ | Ü | |
| á | é | í | ó | ú | ñ | ü |
| ¡ | ¿ | Áá | Éé | Íí | Óó | Úú | Ññ | Üü | |
| ¡ | ¿ | Á | É | Í | Ó | Ú | Ñ | &Uumt; | |
| á | é | í | ó | ú | ñ | ü |
Links
- An excellent school for learning Spanish in México. Some of the best money I have ever spent; I have no releationship with this school except as a happy customer.
- Alt.usage.spanish FAQ (Has this same information, presented differently)
- Another page on how to type in Spanish characters; only covers Windows machines and Macintoshes.