-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToggleLeftHandHotKeys.ahk
More file actions
75 lines (65 loc) · 1.14 KB
/
ToggleLeftHandHotKeys.ahk
File metadata and controls
75 lines (65 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#Requires AutoHotkey v2.0
global isToggled := false
F1:: Toggle()
$f:: LeftClick()
$d:: RightClick()
$c:: DoubleClick()
$e:: MiddleClick()
$s:: DragClickStart()
$s up:: DragClickStop()
Toggle(){
global isToggled
isToggled := ! isToggled
}
LeftClick() {
global isToggled
if (isToggled){
MouseClick("left")
KeyWait("f")
}
else
Send("f")
}
RightClick() {
global isToggled
if (isToggled){
MouseClick("right")
KeyWait("d")
}
else
Send("d")
}
DoubleClick() {
global isToggled
if (isToggled){
MouseClick("left", , , 2)
KeyWait("c")
}
else
Send("c")
}
MiddleClick(){
global isToggled
if (isToggled){
MouseClick("middle")
KeyWait("e")
}
else
Send("e")
}
DragClickStart() {
global isToggled
if (isToggled){
DllCall("mouse_event", "UInt", 0x02) ; MOUSEEVENTF_LEFTDOWN = 0x02
KeyWait("s")
}
else
Send("s")
}
DragClickStop() {
global isToggled
if (isToggled){
DllCall("mouse_event", "UInt", 0x04) ; MOUSEEVENTF_LEFTUP = 0x04
}
}
return