Typing spanish characters and accents in Linux
Being able to properly type and input spanish characters in text is important. If you don’t believe me, ask someone who speaks Spanish to explain the difference between año and, well, ano. Trust me, if you are trying to use año (ie, year), you don’t want to end up writing ano (ie, anus). Plus, for those hosting WordPress blogs or webpages in Spanish, if you want your pages to be properly crawled and have appropiate ads displayed, better to write with the proper characters, accents and punction.
Now, if you are working in a Linux environment like I normally do, it turns out that being able to input the necessary comments and punctionation is easily accomplished. We will use the popular “Dead keys” method. This will allow us to type an ñ by first pressing shift and tilde followed by an n. Similarly, we can type an accented charcter by first pressing ‘ followed by the charcter that we want to accent. If you want use the original functionality of the dead keys, just follow the key press with the spacebar. It doesn’t take too long to get use to.
To get started, just execute the following command
my-box:~ $ setxkbmap -layout us -variant intl
When you need to switch back, leave of the variant parameter
my-box:~ $ setxkbmap -layout us
Now, I need to say here that this will only work in when running X windows. But, I’m not trying to help you do a full blown switch to an international keyboard nor load a different keymap on the system level. This is just to help the casual user with US keyboard properly input Spanish characters, accents and punction. This could be used to write up a homework, communicate with a friend or post in another langauge with our friendly Linux box.
Así, ¿qué esperas? ¡Hazlo ya y no lo vas a arrepentir!


