AutoHotkey like utility for X?
AutoHotkey is a great macro utility for Windows. You can bind your own hotkeys with it and manipulate windows in various ways. It is very useful to make GUI applications more accessible by adding custom keyboard macros to them.
I can replicate most of its funcionality: I use Enlightenment, so I can enumerate windows on the screen and manipulate them programatically with eesh. I can send keyboard and mouse events to windows using xautomation.
The only thing missing is the ability to bind actions to key combinations. Sure, I can bind any key with Enlightenment, but I cannot pass the key to the application if I don't want to deal with it, because it creates a recursive loop.
Here's an example of what I mean: I want F12 to send a special key combination to an application, but only to that application, others should receive F12 unchanged. I can bind F12 to my script and in the script I can check whether a certain application is active, but if the application is not active I cannot send a simulated F12, because it would trigger my script again.
Do you know some kind of a keybinding (keyboard filter, keyboard hook) software for X which allows me to filter keyboard events globally?