8

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.

Oli
  • 293,335

1 Answers1

7

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.

muru
  • 197,895
  • 55
  • 485
  • 740
  • @Oli why/Have you not tried xmodmap command again (for selecting Right Shift) yourself? – Pandya Sep 11 '14 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 '14 at 11:45