FYI, I am trying to get the mouse keys to act as modifiers, e.g. holding down C-mouse-2, acts as a control key modifier. I have this mostly working but have run into a release event problem as outlined below.
Scenario 1: Bind C-down-mouse-2 and C-mouse-2 to commands. Depress control and mouse-2, release the control key, then release the mouse-2 button, you will get a C-down-mouse-2 event and I believe a C-mouse-2 release event even though the control key has been released, as desired.
Scenario 2: Depress control and mouse-2, release the control key, press a, then release the mouse-2 button and you will get a mouse-2 release event, not a C-mouse-2 release event, meaning there is no way to coordinate modified press/release event pairs when there are intervening events unless the modifier is held down throughout the entire sequence of events (which is not very workable when other modified keys need to be pressed in the interim).
I would suggest that once a modified key is depressed, the next release event for that key, regardless of any modifiers now pressed, should match the modifiers of the depress event, unless something a discard-events is done prior to release.
Otherwise, one would have to affect all modified combinations of the button to ensure that the associated release event is triggered whether or not the modifiers are still held down. That surely is not practical. Neither does it make much sense to program pairs of depress/release events where the modifiers differ between press and release.
Can anyone address this?