Can functions in the .fvwm2rc file get 'stuck'?

Ok, here’s a problem/solution set that makes no sense to me. I have spent the last week working on the following problem, and I have posted my ‘kluge’ of a solution, but if anyone can tell me WHY this problem even exists, I would appreciate it.

a function is supposed to send 3 synthetic XEvents (key presses) to an application acting as a consumer

For some reason, the function was sending twice the number of key presses that it was supposed to.

I have been forced to TURN OFF the function once it is called, keep it off for 4 seconds, and then I can turn it back on, and I get only the right amount of keypresses across to the application waiting for the keypresses. Below is my code that got rid of the extra calls (maybe) to the function. It all starts from the Key binding on F20

AddToFunc someotherfunc
+ I KeyF20 A M -

Key F20 A M SwitchWindow
DestroyFunc SwitchWindow
AddToFunc   SwitchWindow
+ I Key F20 A M -
+ I Schedule 4000 someotherfunc
+ I WindowId $[] FakeKeypress press Alt_L  press F20 release Alt_L

Is the problem that, somehow, the keyboard that I am using, is getting stuck? And therefore Sending multiple XEvent of key presses to the fvwm? Barring that (lets suppose the problem is not in the keyboard) HOW ELSE COULD THE PROBLEM THAT I DESCRIBED ABOVE EVEN BE POSSIBLE?

I am seriously lost - I hate fixing a problem that I don’t even understand. Even though that is preferrable to not being able to fix a problem that I do understand.

  • Skender

I am not sure what’s causing that — try running xev (bound to this application) that receives the events.

– Thomas Adam