Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Few days back one of my keyboard key('O') came out, and I can't it intact again. Is there any way to configure another key, or a combination of key to work as a replacement of the lost key?

I'm using Ubuntu 12.04 OS.

share|improve this question
    
Basically, you can. Just look up questions relating to autohotkey, as long as you're using Windows. But why don't you just buy a new keyboard? –  user 99572 is fine Jun 29 '13 at 8:05
    
@user99572isfine. I'm using Ubuntu. And sure I can buy a new keyboard. That's certainly an option. But just wanted to know is there a way. –  Rohit Jain Jun 29 '13 at 8:06
    
    
There is a answer on the askbuntu site about this same thing, may have wanted to check there first, which is usually best for ubuntu/linux questions in general. askubuntu.com/questions/24916/how-do-i-remap-certain-keys –  user88311 Jun 29 '13 at 12:42

1 Answer 1

For example, if you want the menu key to function like 'o', you can first create an xmodmap file:

$ xmodmap -pke > ~/.Xmodmap

Open the file and look for the line which contains the mapping for the menu key, something like:

keycode 135 = Menu Insert Menu

You can also start xev, type the menu key and look for the keycode in xev's output. Then, replace everything after the equals sign with the desired mapping, i.e., if you want it to behave like 'o', use something like:

keycode 135 = o O o O

To use the new xmodmap file, type

$ xmodmap ~/.Xmodmap

The settings are usually lost after shutdown, however, I'm not sure if Ubuntu somehow loads the .Xmodmap automatically.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.