i have hp pavillion g6 running manjaro, the keyboard looks like this, i broke both shift, the left ctrl and the caps lock... hmm while trying to clean it...

i don't really care about ctrl, the other one is still working, nor about caps lock, coz i don't usually get angry online. i want to remap a shift key to the print key, next to the right alt, if you see it.

been told that xmodmap could do that but it's somehow complicated to use and i haven't find the code to the key i want to swap and they say the software slows down pc boot time by 30s and stuff, so i want another solution unless of course you can do it without slowing down boot time.

and i also tried autokey, but that thing is kinda useless, i mean you can't map all keys, and i'm not gonna map a key that i use, and useless keys like the print key doesnt seem they work, anyway i export it to my github and will work on it in my free time, for now i need something that works.

  • The print key is some other key than the one you are referring to. The key you want to use is more known as the context menu key.
    – Lambert
    Jun 4, 2015 at 12:16
  • @Lambert what is it called in the file, so i map that, yes of course i don't want to map the print screen key, i use it all the time and its place isn't ideal for a shift key
    – Lynob
    Jun 4, 2015 at 16:02

1 Answer 1


xmodmap is the tool you want. No, it does not slow down anything at all.

man xmodmap says:

           This removes all entries in the modifier map for  the
           given  modifier,  where  valid name are: Shift, Lock,
           Control, Mod1, Mod2, Mod3, Mod4, and Mod5 (case  does
           not matter in modifier names, although it does matter
           for all other names).  For  example,  ``clear  Lock''
           will remove all any keys that were bound to the shift
           lock modifier.

           This adds all keys containing the  given  keysyms  to
           the  indicated  modifier  map.   The keysym names are
           evaluated after all input  expressions  are  read  to
           make  it  easy to write expressions to swap keys (see
           the EXAMPLES section).

To find the desired keysymname you can use xev.

It is probably enough to run:

xmodmap -e 'add Shift = Print'

(Be aware that the "Print" key is probably the one labeled "prt sc", but xev will tell you the facts.)

  • No, I don't think that's enough. Some applications don't react well when the keysyms sent by modifier keys aren't the expected ones. You'd need to change Print to send the Shift_L or Shift_R keysym. Jun 4, 2015 at 21:45
  • If that is needed xmodmap -e 'keycode 107 = Shift_L' would be easy, too.
    – michas
    Jun 4, 2015 at 22:07
  • i made a mistake, i don't want to remap to print, but rather to the context menu key as lambert has said, how to do so? i assumed it's the print key because of the logo on top of it
    – Lynob
    Jun 4, 2015 at 23:48
  • Just use xev to find the name or number of the key you are interested in.
    – michas
    Jun 5, 2015 at 3:11
  • I get this pastebin.com/fDaBaFMY should i use the keycode or serial? would you please show an example? thank you. first time using xev xmodmap so it's kinda confusing
    – Lynob
    Jun 6, 2015 at 15:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .