Saturday, 5 July 2008

Keyboard Layouts in Ubuntu

I type enough in Spanish that I like to be able to switch keyboard layouts between English and Spanish, rather than type Alt-whatever to get the Spanish characters (e.g. ñ, ¡, ¿).

In Ubuntu 8.04 (Hardy), go to System--> Administration--> Language Support and install Spanish. This requires a reboot. Truth be told, I'm not sure you have to do this step just to get the keyboard layout, but if you type enough in a language that you want the keyboard layout, you probably want the rest of the language support as well.

To install control over the keyboard layout:
  1. Right-click on the top panel (aka menu bar, aka tool bar) and select "Add to Panel..."
  2. Select "Keyboard Indicator". You'll see the indicator appear in the panel. In my case, it said "USA"
  3. Right click on the indicator and select "Keyboard Preferences"
  4. Select the "Layouts" tab
  5. Click the "Add..." button
  6. Select the keyboard layout you want. For those looking for Spanish, note that there's a layout for Spain and a layout called "Latin American". The keyboard I bought in Guatemala is actually the "Spanish" layout. You'll have to figure out what works for you
  7. Click OK until you're back to what you wanted to be doing
Of course, that doesn't change the physical keycaps. When you're using the Latin American layout with a USA keyboard, it's sometimes hard to find some of the special characters. They're not in the same place on the two keyboards. Fortunately, we have yet another nice advantage of Ubuntu over Windows. You can right-click on the keyboard indicator and select "Show Current Layout" and it gives you a picture of your keyboard. You can even print the layout.

1 comment:

dave said...

Thanks for this. I've been using a US layout with dead keys support. But it's really annoying to have to hit the ' (single-quote) or " (double-quote) key twice to get the desired punctuation mark.