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 

Dual hotkeys (using an ampersand)

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





PostPosted: Thu Jun 16, 2005 12:48 am    Post subject: Dual hotkeys (using an ampersand) Reply with quote

I have the following simple code for use with Internet Explorer; it moves Back/Forward to the Previous/Next page:
Code:
MButton & WheelUp:: Send, !{Left}      ;Back.
MButton & WheelDown:: Send, !{Right}   ;Forward.

It functions as expected, except that MButton doesn't work if it's clicked on its own (ie, without rolling the wheel).

Is there a way to make MButton work as normal unless it's clicked in conjunction with a wheel movement? I know I can used the '~' prefix, but that causes a MButton click even if the dual hotkey is activated.

This isn't a life & death situation, and there are plenty of alternative ways to do what I want, but I'd just like to understand the general case regarding dual hotkeys.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Thu Jun 16, 2005 12:55 pm    Post subject: Re: Dual hotkeys (using an ampersand) Reply with quote

Harmless wrote:
Is there a way to make MButton work as normal unless it's clicked in conjunction with a wheel movement?
Yes, you can do this by having MButton "send itself". Add the following hotkey:
*MButton::Send {MButton}

This will cause the release of MButton to send a middle-click whenever you didn't turn the wheel.

The above hotkey does not use the $ prefix because hotkeys that "send themselves" do not need it if they are mouse hotkeys.
Back to top
View user's profile Send private message Send e-mail
Harmless
Guest





PostPosted: Thu Jun 16, 2005 10:13 pm    Post subject: Reply with quote

Excellent, thanks Chris.
Back to top
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