Is there a way to know which processes are listening to a given key binding?
For example, suppose I want to know which programs will do something when I press Ctrl+g. I guess the X server manages this, but how can I view the listening events?
To be clear, I'm not asking for how to set key bindings on X, but for how to find all processes which will do something when some combination of key presses (or mouse events for that matter) is used, possibly using command line tools.