AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fun with modifiers!

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 2:32 am    Post subject: Fun with modifiers! Reply with quote

Yeah, isn't debugging the greatest.... Laughing

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 26, 2005 4:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 4:44 am    Post subject: Reply with quote

<<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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group