-
Notifications
You must be signed in to change notification settings - Fork 0
/
MG_Config.ahk
316 lines (240 loc) · 4.18 KB
/
MG_Config.ahk
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
MG_Interval:=20
MG_TimeoutThreshold:=10
MG_Timeout:=1000
MG_Threshold:=30
MG_DGInterval:=0
MG_LongThresholdX:=800
MG_LongThresholdY:=600
MG_LongThreshold:=700
MG_8Dir:=1
MG_UseNavi:=0
MG_UseExNavi:=0
MG_EditCommand:=
MG_ActiveAsTarget:=0
MG_TraySubmenu:=0
MG_ORangeDefault:=4
MG_ORangeA:=1
MG_ORangeB:=5
MG_MaxLength=6
MG_Triggers=MB
MG_SubTriggers=LB_RB_WU_WD
Goto,MG_MB_End
MG_MB_Enable:
Hotkey,*MButton,MG_MB_DownHotkey,On
Hotkey,*MButton up,MG_MB_UpHotkey,On
return
MG_MB_Disable:
Hotkey,*MButton,MG_MB_DownHotkey,Off
Hotkey,*MButton up,MG_MB_UpHotkey,Off
return
MG_MB_DownHotkey:
MG_TriggerDown("MB")
return
MG_MB_UpHotkey:
MG_TriggerUp("MB")
return
MG_MB_Down:
SetMouseDelay,-1
Send,{Blind}{MButton Down}
return
MG_MB_Up:
SetMouseDelay,-1
Send,{Blind}{MButton Up}
return
MG_MB_End:
Goto,MG_LB_End
MG_LB_Enable:
Hotkey,*LButton,MG_LB_DownHotkey,On
Hotkey,*LButton up,MG_LB_UpHotkey,On
return
MG_LB_Disable:
Hotkey,*LButton,MG_LB_DownHotkey,Off
Hotkey,*LButton up,MG_LB_UpHotkey,Off
return
MG_LB_DownHotkey:
MG_TriggerDown("LB")
return
MG_LB_UpHotkey:
MG_TriggerUp("LB")
return
MG_LB_Down:
SetMouseDelay,-1
Send,{Blind}{LButton Down}
return
MG_LB_Up:
SetMouseDelay,-1
Send,{Blind}{LButton Up}
return
MG_LB_End:
Goto,MG_RB_End
MG_RB_Enable:
Hotkey,*RButton,MG_RB_DownHotkey,On
Hotkey,*RButton up,MG_RB_UpHotkey,On
return
MG_RB_Disable:
Hotkey,*RButton,MG_RB_DownHotkey,Off
Hotkey,*RButton up,MG_RB_UpHotkey,Off
return
MG_RB_DownHotkey:
MG_TriggerDown("RB")
return
MG_RB_UpHotkey:
MG_TriggerUp("RB")
return
MG_RB_Down:
SetMouseDelay,-1
Send,{Blind}{RButton Down}
return
MG_RB_Up:
SetMouseDelay,-1
Send,{Blind}{RButton Up}
return
MG_RB_End:
Goto,MG_WU_End
MG_WU_Enable:
Hotkey,*WheelUp,MG_WU_Hotkey,On
return
MG_WU_Disable:
Hotkey,*WheelUp,MG_WU_Hotkey,Off
return
MG_WU_Hotkey:
MG_ButtonPress("WU")
return
MG_WU_Press:
SetMouseDelay,-1
Send,{Blind}{WheelUp}
return
MG_WU_End:
Goto,MG_WD_End
MG_WD_Enable:
Hotkey,*WheelDown,MG_WD_Hotkey,On
return
MG_WD_Disable:
Hotkey,*WheelDown,MG_WD_Hotkey,Off
return
MG_WD_Hotkey:
MG_ButtonPress("WD")
return
MG_WD_Press:
SetMouseDelay,-1
Send,{Blind}{WheelDown}
return
MG_WD_End:
Goto,MG_Config_End
MG_IsDisable(){
global
return (0)
}
MG_IsEditor(){
global
return ((MG_CClass="Edit")||(MG_CClass="TEdit"))
}
MG_IsBrowser(){
global
return ((MG_CClass="Internet Explorer_Server")||(MG_CClass="MozillaWindowClass")||(MG_CClass="OperaWindowClass")||(MG_CClass="WebViewWindowClass")||(MG_CClass="Chrome_RenderWidgetHostHWND"))
}
MG_IsCommandPrompt(){
global
return ((MG_WClass="ConsoleWindowClass"))
}
MG_IsMenu(){
global
return ((MG_WClass="#32768"))
}
MG_IsFileDialog(){
global
return ((MG_WClass="#32770"))
}
MG_IsMaximized(){
global
return ((MG_Win("MinMax")=1))
}
MG_IsExScroll(){
global
return ((MG_WClass="MozillaWindowClass")||(MG_WClass="MozillaDialogClass")||(MG_WClass="MediaPlayerClassicW")||(MG_WClass="wxWindowClassNR")||(MG_WClass="OpusApp")||(MG_WClass="Vim")||(MG_WClass="TTelnetForm")||(MG_WClass="fengyue")||(MG_CClass="DirectUIHWND"))
}
MG_IsExMinimize(){
global
return ((MG_WClass="TTelnetForm"))
}
MG_IsVNC(){
global
return ((MG_Exe="vcxsrv.exe")||(MG_WClass="VcXsrv/x"))
}
MG_Gesture_MB_8_:
Send,{Home}
return
MG_Gesture_MB_2_:
Send,{End}
return
MG_Gesture_MB_82_:
Send,{F5}
return
MG_Gesture_MB_4_:
Send,^{c}
return
MG_Gesture_MB_6_:
Send,^{v}
return
MG_Gesture_MB_46_:
Send,^{x}
return
MG_Gesture_MB_7_:
Send,^{c}
return
MG_Gesture_MB_3_:
Send,^{v}
return
MG_Gesture_MB_73_:
Send,^{x}
return
MG_Gesture_MB_9_:
if(MG_IsVNC()){
Send,!{F10}
}else if(MG_IsMaximized()){
WinRestore
}else{
WinMaximize
}
return
MG_Gesture_MB_1_:
if(MG_IsVNC()){
MG_Abort()
}else if(MG_IsExMinimize()){
PostMessage, 0x112, 0xF020, , , A
}else{
WinMinimize
}
return
MG_Gesture_MB_19_:
Send,#{d}
return
MG_Gesture_MB_84_:
Send,!{Left}
return
MG_Gesture_MB_86_:
Send,!{Right}
return
MG_Gesture_MB_24_:
Send,^{F4}
return
MG_Gesture_MB_26_:
if(MG_IsVNC()){
Send,!{F4}
}else{
WinClose
}
return
MG_Gesture_MB_LB_:
Send,{PgDn}
return
MG_Gesture_MB_RB_:
Send,{PgUp}
return
MG_Gesture_MB_WU_:
Send,{WheelLeft}
return
MG_Gesture_MB_WD_:
Send,{WheelRight}
return
MG_Config_end: