To find out which app/program grabbed your key use the debug keysym XF86LogGrabInfo. Use xdotool to press keys + XF86LogGrabInfo at the same time e.g. in a terminal run
KEY=XF86AudioPlay xdotool keydown ${KEY}; xdotool key XF86LogGrabInfo; xdotool keyup ${KEY} Then check for output with tail /var/log/Xorg.0.log
Note that with gnome 3/gdm and systemd this is no longer logged to Xorg.0.log (it's instead logged to the journal). In that case you could run
journalctl -f and then in another terminal run the xdotool commands. Switch to the first terminal and you'll see something like
/usr/lib/gdm/gdm-x-session[629]: Active grab 0x40c0a58e (xi2) on device 'Virtual core keyboard' (3): /usr/lib/gdm/gdm-x-session[629]: client pid 708 /usr/bin/gnome-shell /usr/lib/gdm/gdm-x-session[629]: at 32595124 (from passive grab) (device frozen, state 6) /usr/lib/gdm/gdm-x-session[629]: xi2 event mask for device 3: 0xc000 /usr/lib/gdm/gdm-x-session[629]: passive grab type 2, detail 0xac, activating key 172 In the above example the program (the client) that grabbed the key is gnome-shell.