My nephew played with my keyboard and now my S key is out. Is there a way I can change the keyboard layout to attribute the S value to a key I don't use (ie, right Alt)? To make myself crystal clear, is there a way that I can tell Ubuntu that when I press the right Alt, it prints S?
2 Answers
You have to add a line to the .xinitrc file in your home folder, or add a command to your startup scripts. This command will remap your keyboard to use a different key for "s".
The command you have to add will look something like this: xmodmap -e 'keycode <value>=<action>'
. You have to replace "value" with the key you will press to represent "action" letter. For example, in your case, you want to reassign the letter E to the right Alt key (a guide for all the different key codes is here). I don't know how to assign S to the right Alt key but the Left Alt key is no problem. Make a command like this: xmodmap -e 'keycode 64=s'
and add it to your startup scripts.
-
yeah! it worked! The value for Alt-Right did not show in the link you hit me, but after some google, you can just type
xmodmap
from tty with no args and it will show you special codes for your keyboard. This is what worked for me:xmodmap -e 'keycode 0x6c=s'
Dec 22, 2011 at 16:00
Try xkeycaps (you may have to install the package, not sure). This suggestion comes from an old forum post
-
the gui is very old school, so I went for solution above but i'll definitely give it a closer look when i'll have the time ;) Dec 22, 2011 at 16:01