What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or constricting the mouse pointer to remain in a particular screen area.) I'm looking for a hypothetical xgrab
utility that would show things like
Key 0x00f00ba5 0x123 0
Button 0x00f00ba5 2
Pointer 0x00abcdef
meaning that there has been a call to XGrabKey(display, 0x123, 0, 0x00f00ba5, ...)
and so on with XGrabButton
, XGrabPointer
, XGrabKeyboard
, XGrabServer
(if possible). The display format doesn't matter, what I want is some way to see who's grabbing what, and possibly some way of revoking these grabs (if it's possible, I'm not sure if the X11 API allows that).
xdotool key XF86LogGrabInfo
triggers only two entries in the X log: “Printing all currently active device grabs:” immediately followed by “End list of active device grabs”. Yet my window manager does grab a bunch of keys. Have you seen this work for grabbed keys? – Gilles 'SO- stop being evil' Nov 16 '14 at 23:15sleep 2; xdotool key "XF86LogGrabInfo"
and immediately start pressing a key (e.g. the "Win" key) very fast, then you'll see some output in Xorg.log. Or usexdotool
to press keys +XF86LogGrabInfo
at the same time, like here – don_crissti Nov 25 '14 at 00:58XF86LogGrabInfo
only prints information about a key that is currently pressed? That limits its usefulness. I want to list all the grabs — all the passive grabs, if I understand the terminology correctly. – Gilles 'SO- stop being evil' Nov 25 '14 at 10:13xfsettingsd
was stealing myWin
+L
shortcut. – Mikel May 13 '15 at 06:52