Reputation: 13
I am new to ahk. I know how to bind a key to a key (a::b), but is it possible to bind a key to a mouse click?
Upvotes: 1
Views: 303
Reputation:
It depends on key you want to bind. You can use
a::Click ; for most of the keys
`;::Click ; escaping special characters such as ";" is required
Upvotes: 0
Reputation: 1233
There are several ways. For example:
g::click
or
h::mouseclick
If you want to do additional stuff when mouse is pressed down you can do this
d::
Click down
MsgBox You pressed down d.
KeyWait, d
Click up
MsgBox You released d.
return
Upvotes: 1