Sign in to follow this  
Followers 0

Multiple keys in HotKeySet

5 posts in this topic

Posted (edited)

Hi.

What format should I use to allow me to add more than one button into a hotkey? I have tried:

HotKeySet("{RCTRL}m", Double_Click")

HotKeySet("{RCTRL}""m", Double_Click")

HotKeySet("{RCTRL}+m", Double_Click")

HotKeySet("{RCTRL}"+"m", Double_Click")

I just can't work it out. Is it even possible to add control into it (I tried reading the help file for that part but I just couldn't make sense of it.)

Thanks, Wez

Edited by Xait

Share this post


Link to post
Share on other sites



Posted

Hi.

What format should I use to allow me to add more than one button into a hotkey? I have tried:

HotKeySet("{RCTRL}m", Double_Click")

HotKeySet("{RCTRL}""m", Double_Click")

HotKeySet("{RCTRL}+m", Double_Click")

HotKeySet("{RCTRL}"+"m", Double_Click")

I just can't work it out. Is it even possible to add control into it (I tried reading the help file for that part but I just couldn't make sense of it.)

Thanks, Wez

To have a hotkey sequence which uses modifier keys you have to use a special symbol as described in the help to indicate the modifier key to be used. You cannot use the code for the actual modifier key, ie the code you would use in Send.

So Ctrl m would be

HotKeySet("^m","DoubleClick")

Note that the function name must be given as a string. Tagging a quotation mark at the end of the function name is random daftness or a trypo.

If you only want to respond when the right ctrl is pressed then I think the way to do it might be like this

Func DoubleClick()
 If Not _IsPressed("A3") then return;the right Ctrl key is not pressed (needs #include <misc.au3>)
 ;carry on with whatever

EndFunc

Share this post


Link to post
Share on other sites

Posted

I believe this would work for Right Control Shift m

HotKeySet("{RCTRL}+m", "Double_Click")

snowmaker, stand in the corner for 2 hours and contemplate the validity of your beliefs.

Share this post


Link to post
Share on other sites

Posted

The idiot in me for some reason posted before testing.. I'll be in a corner..

Share this post


Link to post
Share on other sites

Posted

Thanks people.

That mistake was a typo (I was too far to reach over to the other screen and copy+ paste so i wrote it again - wrong)

Thanks again, Wez

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.