Jump to content

Multiple keys in HotKeySet


Xait
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...