| View previous topic :: View next topic |
| Author |
Message |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sat Feb 26, 2005 2:32 am Post subject: Fun with modifiers! |
|
|
Yeah, isn't debugging the greatest....
Anyway, I'm trying to make a simple routine that can detect if a modifier has... well, modified, and if it hasn't, run the label. For instance, pressing and releasing the left control key would activate the label, but holding control and pressing "c" would leave it untouched. My goal was to do this using the new "up" hotkeys, since that would seem the simplest way. My previous attempts have seemed to come close, but are really nonsensical. I'd particularly like to avoid a complex GetKeyState loop or something like that, since this is just a trick I'm curious about, and that I'd like to add to my subroutine collection if it's possible. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sat Feb 26, 2005 4:34 am Post subject: |
|
|
You've probably already tried this, but the original prefix key-up feature seems to fit your description exactly:
LControl & RControl::return ; Make LControl a prefix like this or anything similar.
LControl::MsgBox You released LControl without it having modified anything.
In the above, the LControl hotkey will not fire if you modified any other key while it was down, even if the key being modified was not a hotkey. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sat Feb 26, 2005 4:44 am Post subject: |
|
|
<<wakes up from unconsciousness brought on by repeated banging on the head>>
I guess I was a little too excited about that new feature to remember this. Thanks, Chris. I needed it to bring up my custom Run dialog (made with an AHK gui), so it could be brought up on a single press of Control. |
|
| Back to top |
|
 |
|