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).

  • A better duplicate for this question is https://unix.stackexchange.com/questions/261371/how-do-i-find-out-what-program-owns-a-hotkey – A.P. Jun 14 '19 at 10:56

1 Answers1

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.

  • 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. – Robert Siemer Nov 16 '14 at 12:00
  • Apparently I was working under some misconceptions. I've removed them from my answer, and added information from another question, linked. – Thomas Shaw Nov 17 '14 at 15:41