á: 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.
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 ü.
Ññ: 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 + /)
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).
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; |
á | é | í | ó | ú | ñ | ü |