-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatt.ahk
197 lines (182 loc) · 4.62 KB
/
matt.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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; window string matching, subset
; SetTitleMatchMode, Slow
#Persistent
#SingleInstance Force
; Turn NumLock on for Naga
SetNumLockState, AlwaysOn
; Variables
HotkeyTriggered := false ; ensures multiple gestures don't trigger simultaneously
; Delete line
#Backspace::
send {LShift down}{Home}{LShift up}{Backspace}
return
; Task View
XButton1 & XButton2::
XButton2 & XButton1::
send {LWin down}{Tab}{LWin up}
return
; Snap windows & Switch desktops
XButton1 & WheelUp::
if ( A_TimeSincePriorHotkey > 200 )
send {LWin down}{Up}{LWin Up}
return
XButton1 & WheelDown::
if ( A_TimeSincePriorHotkey > 200 )
send {LWin down}{Down}{LWin Up}
return
XButton1 & WheelLeft::
send {LWin down}{Left}{LWin up}
return
XButton1 & WheelRight::
send {LWin down}{Right}{LWin up}
return
XButton1 & LButton up::
send {LCtrl down}{LWin down}{Left}{LWin up}{LCtrl up}
return
XButton1 & RButton up::
send {LCtrl down}{LWin down}{Right}{LWin up}{LCtrl up}
return
XButton1 & MButton up::
Run "C:\Users\mattk\AppData\Local\Mizage LLC\Divvy\Divvy.exe"
return
; Application specific
#ifWinActive, ahk_class CabinetWClass
XButton2 & WheelLeft::
if ( A_TimeSincePriorHotkey > 200 )
send {LAlt down}{Left}{LAlt up}
return
XButton2 & WheelUp::
if ( A_TimeSincePriorHotkey > 200 )
send {LAlt down}{Up}{LAlt up}
return
XButton2 & WheelRight::
if ( A_TimeSincePriorHotkey > 200 )
send {LAlt down}{Right}{LAlt up}
return
#ifWinActive, ahk_exe Atom.exe
XButton2 & WheelLeft::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{k}{p}{LCtrl up}
return
XButton2 & WheelUp::
send {LCtrl down}{WheelUp}{LCtrl up}
return
XButton2 & WheelRight::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{k}{n}{LCtrl up}
return
XButton2 & WheelDown::
send {LCtrl down}{WheelDown}{LCtrl up}
return
XButton2 & LButton up::
send {LCtrl down}{PgUp}{LCtrl up}
return
XButton2 & RButton up::
send {LCtrl down}{PgDn}{LCtrl up}
return
XButton2 & MButton::
send {LCtrl down}{0}{LCtrl up}
return
Numpad9::
send {LCtrl down}{LShift down}{t}{LShift up}{LCtrl up}
return
#ifwinActive, Drawboard PDF
XButton2 & WheelLeft::
send {Left}
return
XButton2 & WheelUp::
send {LCtrl down}{WheelUp}{LCtrl up}
return
XButton2 & WheelRight::
send {Right}
return
XButton2 & WheelDown::
send {LCtrl down}{WheelDown}{LCtrl up}
return
XButton2 & LButton up::
send {LCtrl down}{LShift down}{Tab}{LShift up}{LCtrl up}
return
XButton2 & RButton up::
send {LCtrl down}{Tab}{LCtrl up}
return
XButton2 & MButton::
send {Right}{Left}
return
#if WinActive("ahk_exe msedge.exe") || WinActive("ahk_exe Firefox.exe") || WinActive("ahk_exe Opera.exe")
XButton2 & WheelLeft::
send {LAlt down}{Left}{LAlt up}
return
XButton2 & WheelUp::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{t}{LCtrl up}
return
XButton2 & WheelRight::
send {LAlt down}{Right}{LAlt up}
return
XButton2 & WheelDown::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{w}{LCtrl up}
return
XButton2 & LButton up::
send {LCtrl down}{LShift down}{Tab}{LShift up}{LCtrl up}
return
XButton2 & RButton up::
send {LCtrl down}{Tab}{LCtrl up}
return
XButton2 & MButton::
send {LCtrl down}{LShift down}{t}{LShift up}{LCtrl up}
return
; Numpad/Naga shortcuts
Numpad1::
send {LAlt down}{Left}{LAlt up}
return
Numpad2::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{t}{LCtrl up}
return
Numpad3::
send {LAlt down}{Right}{LAlt up}
return
Numpad5::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{w}{LCtrl up}
return
Numpad4::
send {LCtrl down}{LShift down}{Tab}{LShift up}{LCtrl up}
return
Numpad6::
send {LCtrl down}{Tab}{LCtrl up}
return
Numpad7::
send {LCtrl down}{LShift down}{t}{LShift up}{LCtrl up}
return
#ifWinActive, ahk_exe Matlab.exe
XButton2 & WheelLeft::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{LShift down}{Tab}{LShift up}{LCtrl up}
return
XButton2 & WheelRight::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{Tab}{LCtrl up}
return
XButton2 & WheelDown::
if ( A_TimeSincePriorHotkey > 200 )
send {LCtrl down}{w}{LCtrl up}
return
XButton2 & LButton up::
send {LCtrl down}{PgUp}{LCtrl up}
return
XButton2 & RButton up::
send {LCtrl down}{PgDn}{LCtrl up}
return
#ifWinActive, ahk_exe X2.exe
XButton2 & WheelUp::
send {LCtrl down}{WheelUp}{LCtrl up}
return
XButton2 & WheelDown::
send {LCtrl down}{WheelDown}{LCtrl up}
return