Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tried searching a lot with no success. I know this can be done because I have done it before, but since then I've reinstalled the OS.

I know that I used xmodmap to do this the last time.

My reasoning for this is because both shift keys are broken on my laptop so I've trained myself to use right-ctrl as right-shift.

I know that my laptop has right-ctrl as keycode 105. As far as I can tell left shift is keycode 50 and right shift is keycode 62.

I've tried doing the following things:

xmodmap -e 'keycode 105 = Shift_R' (this shows the right-ctrl key as being right-shift under xev but pressing it actually does nothing)

xmodmap -e 'keycode 105 = 62' (this outputs >)

xmodmap -e 'keycode 105 = 50' (this outputs 2)

Can someone please show me what I need to do in order to make this work and make it work as a permanent change? This is an unusable OS for me until I can do this. I manged this in Windows in just a few minutes! :(

share|improve this question

In order to edit a special key/signal, you have to clear it in the beginning of ~/.Xmodmap. For example:

clear Shift_R

and then add the new signals at the end of ~/.Xmodmap. It may be helpful:

Write your expressions in ~/.Xmodmap to make the changes permanent.

share|improve this answer
Clear will only accept clear Shift. You can then do whatever is require later on in de xmodmap. clear Shift_R will throw an error (bad modifier name). – FvD Oct 5 '13 at 15:57

Your Answer


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.