My first thought was along similar lines. But there are some complications and I'm not sure how to deal with them.
The first question is, What triggers Mojo to act? You suggest the trigger should be a change in the focus window. But how can Mojo know that the focus window changes? The only way I can think of is for Mojo to install an OS hook of some kind, probably a WH_SHELL hook. This might slow the computer down appreciably. I don't know, it would require testing. If somebody can think of a different way please tell me.
Second, what action does Mojo take? The suggestion is, tell every broadcast target that modifiers are up. I think there would need to be some conditional restrictions on this because the user might not want that to happen. To take an extreme example, the program is going to allow people to write a hotkey like this:
That basically means, "Make the target program think Alt is pressed and let it keep thinking that until I say so."Code:Hotkey ( F1 ) { SendTo ( WoW1 ) PressKey ( Alt ); }
I can't foresee why somebody would write that, but it's legal given the program's syntax so part of my job is to ensure that it works and avoid automatic actions that interfere with the user's intent.
Last edited by Freddie : 01-18-2010 at 03:40 PM
�Author of HotkeyNet and Mojo
Connect With Us