3

How can I list the X clients which registered for a specific keyboard event (i.e. a key press; a shortcut thing). Those things are called passive key(board) grabs.

And the list should contain what that application is registered for what keysyms (with what modifiers).

1

1 Answer 1

1

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.

2
  • 1
    The X server has perfect knowledge about which application has which (passive) keyboard grabs. And it doesn’t modify keysyms, it is instead responsible to have a mapping for key events to keysyms. xmodmap is outdated since 1996. Grabbed keys are not passed to the window in focus. And last but not least: the window manager does not participate in event distribution in any special way. Nov 16, 2014 at 12:00
  • Apparently I was working under some misconceptions. I've removed them from my answer, and added information from another question, linked. Nov 17, 2014 at 15:41

Not the answer you're looking for? Browse other questions tagged .