Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I saw this question the other day. The user's K key was broken and they wanted to map it to Right-Shift. A good answer popped up and I thought I'd test it to see if it worked. I ran:

xmodmap -e "keycode 62 = k"

I did this under the understanding that I never use Right-Shift for anything. It turns out I was completely wrong. I use it all day long.

I've been filling up documents, corrupting commands, even almost deleting the wrong things (with Right-Shift+Delete). It's been a roller-coaster of emotions, but now I want it to go away. I'm sorry universe.

I know I could reboot or even just restart X but I have a load of things running and work to do. Can I just remove the mapping that xmodmap has created so that Right-Shift is just Right-Shift?

In this case it's just a single mapping (so Etcher Sketch approaches will work for me) but assume I have other mappings that I want to keep.

share|improve this question
    
Also see askubuntu.com/q/29603/158442 –  muru Sep 2 at 8:50

1 Answer 1

up vote 6 down vote accepted

Try:

xmodmap -e "keycode 62 = Shift_R"

I used xmodmap -pke to see the list of current mappings, and look up Left-Shift. The right one follows from symmetry.

share|improve this answer
    
Yup works well, thanks. –  Oli Sep 2 at 8:54
    
@Oli why/Have you not tried xmodmap command again (for selecting Right Shift) yourself? –  Pandya Sep 11 at 11:21
    
@Pandya I wondered if it was a trick question, but then after a few tries I realised that the name for Right Shift might be the problem. Until I ran it with -pke I had guessed R_Shift, RShift, RightShift, etc. –  muru Sep 11 at 11:45

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.