See this previous question and this one.
The first answer to the second question above discusses a way of asking X to write a list of current key grabs to the X log:
xdotool key XF86LogGrabInfo
although when I tried it, it didn't display some of the grabs I expected to see.
xev
is also a useful tool for diagnosing X event problems. It brings up a window, and logs all keyboard and mouse events sent to that window. If you press a key and the window
field of the corresponding log message is 0x0
, they key event was probably captured by the window manager.