I know I can enter any character I need using the character-map applet, but that means grabbing the mouse/opening the "run" dialog, switching to another window, selecting the character, copying... you get the idea. Is there a quicker way to enter characters that are not available on the keyboard (and are not available as alt-gr combinations)? In my specific case I'm using a laptop with the Italian keyboard layout, but I suspect a general solution exists.
Set up a compose key. In 11.10, it's in Keyboard Layout → Options (in the lower right corner). In 11.04 and below, it's in a similar place, but I don't immediately have a copy to hand. You are looking for a dialog like this:
You can choose which key the compose key will replace in 'Compose key position'. There are many keys there that you will probably never use in Linux, so just replace one of them.
When you have it set, you can press the compose key and other keys (in order) and it will combine them. For example, Compose → ' → A = Á and Compose → ` → a = à. There are tables for which combinations result in which characters online. You can even set up your own compose key table or extend the default one, but that it is a more advanced and probably unnecessary exercise.
A lot of accented characters can be written using the "compose key". By default that means you hit Alt GrR Shift and then type a sequence of letters and characters.
So for á I hit:
- Alt GrR Shift
If you use Shift while you press A, you get Á. I imagine similar things exist for the other compose combinations.
Looks like I should have done my homework.
Plenty of informationon the ubuntu wiki. In my specific case probably the quickest way is Unicode composition since combinations with the acute accent are kind of difficult, the acute accent being an alt-gr combination itself in the italian keyboard layout.
Update: the simplest answer I found is to just turn on Caps Lock. When caps lock is on every accented character you enter is automagically uppercased.