In Mandriva 2006, how do you enter european special characters on an american keyboard?
Old problem! It should have been sorted years ago with the introduction of the
Compose key. But here is the problem: most keyboard sold in shops do not include this compose key...
There are several ways to create a
The Compose key
Ok, what's a
Compose key anyway? Well, it's quite simple: it's a key that you can use to combine symbols and create special or accented characters that are not on your keyboard... For instance, on my keyboard, the
right-Alt key is set as
Compose (see below) and if I type on the
, keys (together) and then
c, I get a
ç. Great, isn't it!
There are tons of combinations, and I'll show you some of them but do not hesitate to experiment:
Alt-, + c = ç
Alt-, + C = Ç
Alt-' + A = Á
Alt-' + a = á
Alt-` + E = È
Alt-` + e = è
Alt-^ + o = ô
Alt-^ + O = Ô
Alt-" + u = ü
Alt-" + U = Ü
Alt-s + s = ß
All in all, it's quite usefull if you want to type european languages...
For those who would not know, X.org is the main graphical interface on modern Linux systems. It's in charge of most graphics related operations, as well as mouse and keyboard. Its configuration file is located at:
To add a
Compose key in X.org, you should look for the section on keyboard within this file, in my case
and add the line
Option "XkbModel" "pc101"
Option "XkbLayout" "en_US"
at the end of this section. It will add a
Option "XkbOptions" "compose:rwin"
Composefunction to the
Windowskey located on the right side of your keyboard. You can also add this function to the
Option "XkbOptions" "compose:ralt"
Option "XkbOptions" "compose:menu"
Usually, it works fine... You just have to restart X and that's it. Unfortunately, my keyboard does not have a
Windows key, nor does it have a
Menu key, and the
Right-ALT key did not work with this technique! I really do not know what is happening, it must be a bug with the latest version of Mandriva...
Composekey in KDE
Ok, let's keep quiet... I do know a second solution: the KDE control center. Start the KDE control center and choose one of the first options,
Accessibility > Keyboard layout, and the panel
Options xkb (Figure 1).
In this panel, you can define a
Compose key, and usually, it works. Obviously, with my weird system, it did not do anything! Damned, go to find something else...
Ok, there was only one solution left: xmodmap... It's one of those typical Unix utilities, you never know how to use them, their manuals are famously unreadable, but you couldn't live without their functionalities! This one can change any keyboard or mouse event, handy isn't it!
So, to get a
Compose function on the
Right-Alt key, you need to create a file called
.Xmodmap in your home directory, with the following content
that will tell
keycode 113 = Multi_key
X.orgthat the key 113 shoud activate
Multi_keymode, our famous
How did I know that the
Right-Alt key was numbered 113? With
xev... Another one of those Unix utilities. You can use it to detect any X windows event. Just type
xev in a konsole and you'll understand what I mean.
Anyway, once our
.Xmodmap file is created, you just have to activate this function with
Miracle, it worked!!
The only thing that remains is to activate this function automatically when you log in. To get this, go into the
~/.kde/Autostart/ folder, create a file called
compose_key.sh with the following content
and make it executable (
chmod a+x ~/.kde/Autostart/compose_key.sh). Each time KDE will start, this file will be run and it will activate the
- A previous article that used
xmodmapto switch mouse event: Remote controls, Laser Pointers, OpenOffice, and Mandriva Linux