3

I'm trying to remap PrtSc key to Insert (to use it in vim), with /usr/bin/xmodmap -e "keycode XXX = Insert" for it, I need to figure out what keycode for PrtSc is.

I'm doing xev -event keyboard and pressing PrtSc, but getting something strange

KeymapNotify event, serial 28, synthetic NO, window 0x0,
    keys:  4294967228 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

Not sure not extract the keycode from this information.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
Moonwalker
  • 621
  • 1
  • 8
  • 18
  • 1
    xorg is interrupting those keys before they reach `xev`, you'll have to kill xorg to get the keycode and even then I'm not sure it will work. I also haven't found an efficient way of killing xorg that would enable me to catch the keycode. – Seth Jan 30 '14 at 18:33
  • @Seth actually in was just print screen application. Disabling it in cinnamon settings did the try. While this is not a general solution, it worked for me – Moonwalker Jan 30 '14 at 18:36
  • 1
    Oh that's cool. PrtSc isn't usually this hard to deal with, so I'm glad it was easier than we thought. – Seth Jan 30 '14 at 18:38

1 Answers1

5

It turned out the PrtSc key was captured by some print screen application. Disabling it in cinnamon settings solved the problem. This also could work for gnome, too.

Moonwalker
  • 621
  • 1
  • 8
  • 18
  • 1
    Actually, in Cinnamon settings (for Cinnamon 2.0 and 2.2) there is no place to disable the key. What helped me was to use `dconf-editor`, navigate to "org -> cinnamon -> settings-daemon -> plugins -> media-keys" and in the right-hand pane, change the line labeled screenshot to be empty (by default it says "Print") [via Linux Mint forum](http://forums.linuxmint.com/viewtopic.php?f=90&t=152887). – Premek Brada May 11 '14 at 21:50