-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSecond_Keyboard_Shortcuts_V2.ahk
308 lines (288 loc) · 8.24 KB
/
Second_Keyboard_Shortcuts_V2.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
; #Include "%A_WorkingDir%\V2_Lib.ahk"
; #Requires AutoHotkey v2.0
; TraySetIcon A_WorkingDir "`\keyboard.png"
; #include "%A_WorkingDir%\Lib\AutoHotInterception.ahk"
; AHI := AutoHotInterception()
; id1 := AHI.GetKeyboardId(0xC0F4, 0x04F5, 1)
; cm1 := AHI.CreateContextManager(id1)
; return
; #NoTrayIcon
;;================= START OF SECOND KEYBOARD ======================;;
#Requires AutoHotkey v2.0
#SingleInstance force
SendMode "Input"
Persistent
#Include <Lib>
#include Lib\AutoHotInterception.ahk
; #Include "%A_WorkingDir%\V2_Lib.ahk"
AHI := AutoHotInterception()
id1 := AHI.GetKeyboardId(0xC0F4, 0x04F5, 1)
cm1 := AHI.CreateContextManager(id1)
ToolTip "Interception Enabled"
SetTimer RemoveToolTip, -500
return
#HotIf cm1.IsActive
;;========================== Fuction Keys ================================;;
Esc:: Reload
F1::
F2::
F3::
F4::
F5::
F6::
F7::
F8::
F9::
F10::
F11::
F12::
;;========================== Number Row ================================;;
`:: {
a := A_TickCount
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
ToolTip "Tap"
}
else if (KeyWait(GetFilteredHotKey(), "T2")) {
ToolTip "Press"
}
else {
KeyWait(GetFilteredHotKey())
ToolTip "Hold"
}
MsgBox A_TickCount - a
ToolTip ""
}
1:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("D:\Programs\AHK\")
}
else {
KeyWait(GetFilteredHotKey())
Run("D:\Programs\AHK.code-workspace")
}
}
2:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("D:\Programs\Python")
}
else {
KeyWait(GetFilteredHotKey())
Run("D:\Programs\Python.code-workspace")
}
}
3:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("D:\Programs\FrontEnd")
}
else {
KeyWait(GetFilteredHotKey())
Run("D:\Programs\JavaScript.code-workspace")
}
}
4:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("D:\Programs\C")
}
else {
KeyWait(GetFilteredHotKey())
Run("D:\Programs\C.code-workspace")
}
}
5:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("D:\Programs\Java")
}
else {
KeyWait(GetFilteredHotKey())
Run("D:\Programs\Java.code-workspace")
}
}
; 6::
7:: Run("https://github.com/Shamil-Xero")
; 8::
; 9::
0:: Run("C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE")
-:: Run("C:\Program Files (x86)\Microsoft Office\root\Office16\POWERPNT.EXE")
=:: Run("C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE")
BS:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
;;========================== Alphabet Row 1 ================================;;
Tab::
q:: RunApplication("WhatsApp", "D:\Programs Files\WhatsApp.lnk")
w:: RunApplication("Unigram", "D:\Programs Files\Unigram.lnk")
e:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run "C:\Program Files\qBittorrent\qbittorrent.exe"
}
else {
KeyWait(GetFilteredHotKey())
Run "C:\Program Files (x86)\Internet Download Manager\IDMan.exe"
}
}
r::
t:: RunApplication(" - Discord",
"C:\Users\Shamil\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord.lnk")
y:: Run("C:\Users\Shamil\AppData\Local\Playnite\Playnite.DesktopApp.exe")
u:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
i:: Run "http://instagram.com/"
o:: RunApplication("ahk_class TankWindowClass",
"C:\Users\Shamil\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Steam\Overwatch® 2.url")
p:: RunApplication("ahk_class TankWindowClass",
"C:\Users\Shamil\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Steam\Marvel Rivals.url")
[:: RunApplication("Adobe Photoshop", "D:\Programs Files\Adobe Photoshop 2025\Photoshop.exe", "#{Down}")
]:: RunApplication("Adobe Lightroom", "C:\Program Files\Adobe\Adobe Lightroom 2024\Lightroom.exe", "#{Down}")
\:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
;;========================== Alphabet Row 2 ================================;;
CapsLock::
a:: RunApplication("VLC media player", "C:\Program Files\VideoLAN\VLC\vlc.exe")
s:: RunApplication("Spotify Free", "C:\Users\Shamil\AppData\Roaming\Spotify\Spotify.exe")
d:: Run "https://www.youtube.com/"
f:: Run '"C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" "https://www.youtube.com/"'
g:: Run "http://localhost:8096/web/#/home.html"
h:: {
if (KeyWait(GetFilteredHotKey(), "T0.3")) {
Run("C:\Windows\System32\cmd.exe")
}
else {
KeyWait(GetFilteredHotKey())
Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe")
}
}
j::
k::
l::
`;:: RunApplication("Adobe Premiere Pro", "D:\Programs Files\Adobe Premiere Pro 2025\Adobe Premiere Pro.exe", "#{Down}"
)
':: RunApplication("Adobe After Effects", "C:\Program Files\Adobe\Adobe After Effects 2024\Adobe After Effects.exe",
"#{Down}")
Enter:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
;;========================== Alphabet Row 3 ================================;;
z:: RunApplication("Microsoft Edge", "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe", "^{Tab}")
x:: RunApplication("Brave", "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe", "^{Tab}")
c:: RunApplication("Visual Studio Code", "C:\Program Files\Microsoft VS Code\Code.exe", "^{Tab}")
v:: Run("D:\Programs Files\TickTick\TickTick.exe")
b:: RunApplication("Notion Calendar", "D:\Programs Files\Notion Calendar.lnk")
n:: RunApplication("ahk_exe Notion.exe", "C:\Users\shami\AppData\Local\Programs\Notion\Notion.exe")
m::
,::
.:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
/:: Run("calc.exe")
;;========================== Special Keys ================================;;
SC07E:: ;PrintScreen
SC061:: ;ScrollLock
PrintScreen:: ;PrintScreen
ScrollLock:: ;ScrollLock
CtrlBreak::
Insert::
End::
Home::
Delete::
PgUp::
PgDn:: {
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
Up:: {
; Send "{Media_Play_Pause}"
Current_Window := WinGetTitle("A")
WinActivate(" - YouTube - Brave")
; ControlGetPos, conX, conY, conW, conH, Chrome_RenderWidgetHostHWND1, A
; ControlClick, , A, , , , %" X" (conX + 1) " Y" (conY + 1)
Sleep 10
Send "d"
WinActivate(Current_Window)
}
Down:: {
; Send "{Media_Play_Pause}"
Current_Window := WinGetTitle("A")
WinActivate(" - YouTube - Brave")
; ControlGetPos, conX, conY, conW, conH, Chrome_RenderWidgetHostHWND1, A
; ControlClick, , A, , , , %" X" (conX + 1) " Y" (conY + 1)
Sleep 10
Send "s"
WinActivate(Current_Window)
}
Left:: {
Current_Window := WinGetTitle("A")
WinActivate(" - YouTube - Brave")
; ControlGetPos, conX, conY, conW, conH, Chrome_RenderWidgetHostHWND1, A
; ControlClick, , A, , , , %" X" (conX + 1) " Y" (conY + 1)
Sleep 10
Send "{Right}"
WinActivate(Current_Window)
}
Right:: {
Current_Window := WinGetTitle("A")
WinActivate(" - YouTube - Brave")
; ControlGetPos, conX, conY, conW, conH, Chrome_RenderWidgetHostHWND1, A
; ControlClick, , A, , , , %" X" (conX + 1) " Y" (conY + 1)
Sleep 10
Send "{Right}"
WinActivate(Current_Window)
}
Space::Media_Play_Pause
;;========================== Modifier Keys ================================;;
SC070:: ;LShift
SC071:: ;LCtrl
SC072:: Send "{LWin}" ;LWin
SC073:: ;LAlt
SC077:: ;RAlt
SC079:: ;Appskey
SC07B:: ;RCtrl
SC07D:: ;RShift
LShift::
LControl::
LWin::
LAlt::
RAlt::
{
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
LControl & RAlt:: MsgBox "You pressed AltGr itself."
Appskey::
RControl::
RShift::
{
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
;;========================== Numpad keys ================================;;
SC05C:: ;NumLock
Numlock::
numpad0::
numpad1::
numpad2::
numpad3::
numpad4::
numpad5::
numpad6::
numpad7::
numpad8::
numpad9::
numpadDiv::
numpadMult::
numpadSub::
numpadAdd::
numpadEnter::
numpadDot::
{
ToolTip A_ThisHotkey
SetTimer RemoveToolTip, -200
}
#HotIf
;====================== END OF ==============================;;