Ubuntu – Unable to set a shortcut to grab screenshot area

gnomekeyboardscreenshotshortcut-keys

I currently have Ubuntu 13.10. At some point the default shortcuts Shift+Prn and Ctrl+Shift+Prn stopped working.

Simply pressing Prn (captures the entire screen) works, pressing Alt+Prn to capture only active window works as well, only the shortcut for area clipping doesn't work for some reason.

Some more facts:

  • Manually running gnome-screenshot -a works as expected!
  • Changing the action to another key combo doesn't help
  • Disabling the action and instead adding a custom shortcut with the command gnome-screenshot -a as answered here doesn't help either

Here's a screenshot of my keyboard settings:

Keyboard settings

Any ideas?

P.S. In CompizConfig Settings Manager, the Commands plugin is turned off


UPDATE @falconer's answer has helped locate the problem, here's the output of a script that simulates key presses and dumps programs that intercept them:

$ xdotool keydown "shift+Print"; xdotool key "XF86LogGrabInfo"; xdotool keyup "Print"; sleep 1; xdotool keyup "shift"; tail /var/log/Xorg.0.log
[ 25474.641] (II) Printing all currently active device grabs:
[ 25474.641] Active grab 0x4220d336 (core) on device 'Virtual core keyboard' (3):
[ 25474.641]       client pid 2196 xneur 
[ 25474.641]       at 25474411 (from passive grab) (device thawed, state 1)
[ 25474.641]         core event mask 0x3
[ 25474.641]       passive grab type 2, detail 0x0, activating key 50
[ 25474.641]       owner-events false, kb 1 ptr 1, confine 0, cursor 0x0
[ 25474.641] (II) End list of active device grabs

It's obvious from this log that in my case it was xneur (keyboard layout switcher program).

Best Answer

I made up a series of commands to show us the passive grabs on a keystroke. While the Take a screenshot of the area setting is set to Shift+Print please run this command and post its output.

xdotool keydown "shift+Print"; xdotool key "XF86LogGrabInfo"; xdotool keyup "Print"; sleep 1; xdotool keyup "shift"; tail /var/log/Xorg.0.log

This will trigger Shift+PrtSc keyevent and should show gnome-settings-daemon grabbing the keyboard.

Please also check if maybe some modifier key is activated on your keyboard and maybe somehow it is interfering with this keycombo. (e.g NumLock, ScrollLock, or some similar keyboard specific thing) Try out the combo with turning those modifiers on/off.