The solution is described here:
http://www.joshstaiger.org/archives/2005/04/fixing_the_righ.html
It needs some modifications though (see item 3.2 below).
Otherwise one would not be able to type anything in current console after the first press of [Right Alt]
.
If this happened to you, switch to other console (e.g. [Ctrl+Alt+F2]
) and restore old keymap.
Here is the brief description of the modified solution:
- Save current keymap to file:
dumpkeys >> mykmap
and make a backup of it:
cp mykmap oldkmap
- Capture
[Right Alt]
keycode using showkey
command. Let s assume it is 100
.
- Edit
mykmap
:
- Find the corresponding line:
keycode 100 = AltGr
and change it to:
keycode 100 = Alt
- If the next line (or one of the next lines) is:
alt keycode 100 = Compose
remove it.
- Load new keymap:
loadkeys mykmap
- Make the changes permanent (e.g. add the last command to ~/.bashrc).