Friday, July 03, 2009

Enabling Accent Marks on a U.S. Keyboard in Ubuntu

Most of the time I write in English. As anyone who reads my blog regularly can tell you, though, sometimes I write in Portuguese. My wife and kids are Brazilian-Americans and I did some mission work in Brazil for a few years. In any case, writing in Portuguese on a North American keyboard can be a pain in the neck, especially when I need the accent marks. In Windows it was a major hassle for me to get accent marks enabled, but in Ubuntu it is fairly simple. Here's how (click images to see larger).


First, go to System > Preferences > Keyboard. Click over to the Layouts tab and you will see the layouts you have set up. Highlight whichever one you use (there may be only one, and if the dot is in the radio box you probably don't need to highlight) and click the Layout Options button.


From inside the Layout Options, drop open Compose key position and choose the key you want to use to activate accent marks when typing. I use Right Ctrl because I can reach it with my little finger and it doesn't interfere with other keyboard operations.


As you can see from the final screen shot, in my text editor (yes, it's white on black background, I find that easier to look at when writing scripts) I was able to write a sentence with accent marks. At this point accent marks will work everywhere on the operating system, from e-mail clients to word processors to the browser and everything in between.

How do you use it? Just press and release the compose key you designated (again, in my case it was Right Ctlr) and then the accent you want. Note that for some (like the "^" above the 6 key) you will need to then hold down the Shift key while hitting the key for the accent you want. For the acute accent mark, of course, you wouldn't need this.
Print this post

3 comments:

Rafael said...

Or, you can use US-International as your keyboard layout and do accents são problema, no switching involved.

Cheers,

Rafael.

PS. Just read your twit about this.

Adam Gonnerman said...

Rafael, thanks for commenting. I had my family's desktop like that but the "dead keys" annoyed me. You're able to get US-International to work without this problem? I found USA with a compose key to be free of this issue.

Adam Gonnerman said...

Rafael,

I went back and double-checked. If you change the settings to US-International and reboot (I don't know why this is necessary, but it's how the change REALLY takes effect) you will find the problem with dead keys. For example, you'll only get the regular apostrophe if you hit it and then the space bar. Using the standard USA layout with the compose key activated circumvents this problem entirely. There are no dead keys, and compose works properly to give accent marks.

Thanks again for commenting.

Post a Comment