Function ordering and stuff

Hi all:

I have the following set of functions that are supposed to do the following:
[list]1. send a FakeKeypress on to the application in focus,
2. set the bound key to a Function that does nothing (I have to have a ‘dead’ time when pressing that bound key will not send an XEvent.)
3. After 4 seconds turn the key binding back to the original function[/list:u]
the problem is that the FakeKeypress is NEVER getting to the Target window!

here is my code:

Key F20 A M FuncSwitchApplications
DestroyFunc FuncSwitchApplications
AddToFunc   FuncSwitchApplications
+ I FuncToggleAddAppsScreen

AddToFunc FuncResetSwitchApplications
+ I Key F20 A M FuncSwitchApplications

DestroyFunc FuncToggleAddAppsScreen
AddToFunc   FuncToggleAddAppsScreen
+ I WindowId $[] FakeKeypress press F20
+ I Key F20 A M FuncNop
+ I Schedule 4000 FuncResetSwitchApplications

AddToFunc FuncNop
+ I Nop

Can anyone see what I might have done wrong here?


Fire up xev from a terminal so that you can watch the ouput from it, and bind it to the application that is to receive the fakeKeyPress. Send the fakekeypress – does xev log the output that the application has received it?

– Thomas Adam