-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctionlayer.ahk
More file actions
541 lines (416 loc) · 7.8 KB
/
Copy pathfunctionlayer.ahk
File metadata and controls
541 lines (416 loc) · 7.8 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
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
#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.
#MenuMaskKey vk07
; ===========playground=============
; ======== key mapping change this for your preferences ========
fn = <!
fnNonModifier = LAlt
toggleKey = Esc
arrowUp = i
arrowDown = k
arrowLeft = j
arrowRight = l
homeKey = h
endKey = n
pageUp = u
pageDown = o
caps = RShift
;function keys F-keys
number1 = 1
number2 = 2
number3 = 3
number4 = 4
number5 = 5
number6 = 6
number7 = 7
number8 = 8
number9 = 9
number10 = 0
number11 = -
number12 = =
mediaPrev = q
mediaPause = w
mediaNext = e
volumeDown = s
volumeUp = d
audioDevice = a
audioOut1 = 1
audioOut2 = 2
; ======== creating hotkeys ========
Hotkey, %fn%%toggleKey%, scriptToggle
;both alt keys work for arrows!
;arrow up
Hotkey, !%arrowUp%, aUp
Hotkey, >!<!%arrowUp%, AaUp
Hotkey, ^!%arrowUp%, CaUp
Hotkey, +!%arrowUp%, SaUp
Hotkey, >!^<!%arrowUp%, ACaUp
Hotkey, >!+<!%arrowUp%, ASaUp
Hotkey, ^+!%arrowUp%, CSaUp
Hotkey, >!^+<!%arrowUp%, ACSaUp
;arrow down
Hotkey, !%arrowDown%, aDown
Hotkey, >!<!%arrowDown%, AaDown
Hotkey, ^!%arrowDown%, CaDown
Hotkey, +!%arrowDown%, SaDown
Hotkey, >!^<!%arrowDown%, ACaDown
Hotkey, >!+<!%arrowDown%, ASaDown
Hotkey, ^+!%arrowDown%, CSaDown
Hotkey, >!^+<!%arrowDown%, ACSaDown
;arrow left
Hotkey, !%arrowLeft%, aLeft
Hotkey, >!<!%arrowLeft%, AaLeft
Hotkey, ^!%arrowLeft%, CaLeft
Hotkey, +!%arrowLeft%, SaLeft
Hotkey, >!^<!%arrowLeft%, ACaLeft
Hotkey, >!+<!%arrowLeft%, ASaLeft
Hotkey, ^+!%arrowLeft%, CSaLeft
Hotkey, >!^+<!%arrowLeft%, ACSaLeft
Hotkey, #!+%arrowLeft%, WSaLeft
;arrow right
Hotkey, !%arrowRight%, aRight
Hotkey, >!<!%arrowRight%, AaRight
Hotkey, ^!%arrowRight%, CaRight
Hotkey, +!%arrowRight%, SaRight
Hotkey, >!^<!%arrowRight%, ACaRight
Hotkey, >!+<!%arrowRight%, ASaRight
Hotkey, ^+!%arrowRight%, CSaRight
Hotkey, >!^+<!%arrowRight%, ACSaRight
Hotkey, #!+%arrowRight%, WSaRight
;other funtions
Hotkey, %fn%%homeKey%, hKey
Hotkey, ^%fn%%homeKey%, ChKey
Hotkey, +%fn%%homeKey%, ShKey
Hotkey, ^+%fn%%homeKey%, CShKey
Hotkey, %fn%%endKey%, eKey
Hotkey, ^%fn%%endKey%, CeKey
Hotkey, +%fn%%endKey%, SeKey
Hotkey, ^+%fn%%endKey%, CSeKey
Hotkey, %fn%%pageUp%, pUp
Hotkey, ^%fn%%pageUp%, CpUp
Hotkey, +%fn%%pageUp%, SpUp
Hotkey, ^+%fn%%pageUp%, CSpUp
Hotkey, %fn%%pageDown%, pDown
Hotkey, ^%fn%%pageDown%, CpDown
Hotkey, +%fn%%pageDown%, SpDown
Hotkey, ^+%fn%%pageDown%, CSpDown
Hotkey, %fn%%caps%, cLock
Hotkey, %fn%%mediaPrev%, mPrev
Hotkey, %fn%%mediaPause%, mPause
Hotkey, %fn%%mediaNext%, mNext
Hotkey, %fn%%volumeDown%, vDown
Hotkey, %fn%%volumeUp%, vUp
Hotkey, %fn%%audioDevice%, aDevice
Hotkey, %fn%%number1%, function1
Hotkey, +%fn%%number1%, Sfunction1
Hotkey, %fn%%number2%, function2
Hotkey, +%fn%%number2%, Sfunction2
Hotkey, %fn%%number3%, function3
Hotkey, +%fn%%number3%, Sfunction3
Hotkey, %fn%%number4%, function4
Hotkey, +%fn%%number4%, Sfunction4
Hotkey, %fn%%number5%, function5
Hotkey, +%fn%%number5%, Sfunction5
Hotkey, %fn%%number6%, function6
Hotkey, +%fn%%number6%, Sfunction6
Hotkey, %fn%%number7%, function7
Hotkey, %fn%%number8%, function8
Hotkey, %fn%%number9%, function9
Hotkey, %fn%%number10%, function10
Hotkey, %fn%%number11%, function11
Hotkey, %fn%%number12%, function12
Hotkey, %fnNonModifier%, nothing
return
; other important function
CapsLock:: Send {BackSpace}
; backspace as delete
<!BS:: Send {Delete}
;üÜ
>!u:: Send {ASC 0252}
+>!u:: Send {ASC 0220}
;öÖ
>!o:: Send {ASC 0246}
+>!o:: Send {ASC 0214}
;äÄ
>!a:: Send {ASC 0228}
+>!a:: Send {ASC 0196}
;ß
>!s:: Send {ASC 0223}
;¿
>!+/:: Send {ASC 0191}
; ======== toggle ========
scriptToggle:
Suspend
return
; ======== arrow keys ========
; arrow key Up
aUp:
send {Up}
return
; single modifier
AaUP:
send !{Up}
return
CaUp:
send ^{Up}
return
SaUp:
send +{Up}
return
; double modifier
ACaUp:
send !^{Up}
return
ASaUp:
send !+{Up}
return
CSaUp:
send ^+{Up}
return
; all modifier
ACSaUp:
send !^+{Up}
return
; arrow key Down
aDown:
send {Down}
return
; single modifier
AaDown:
send !{Down}
return
CaDown:
send ^{Down}
return
SaDown:
send +{Down}
return
; double modifier
ACaDown:
send !^{Down}
return
ASaDown:
send !+{Down}
return
CSaDown:
send ^+{Down}
return
; all modifier
ACSaDown:
send !^+{Down}
return
; arrow key Left
aLeft:
send {Left}
return
; single modifier
AaLeft:
send !{Left}
return
CaLeft:
send ^{Left}
return
SaLeft:
send +{Left}
return
; double modifier
ACaLeft:
send !^{Left}
return
ASaLeft:
send !+{Left}
return
CSaLeft:
send ^+{Left}
return
; all modifier
ACSaLeft:
send !^+{Left}
return
; arrow key Right
aRight:
send {Right}
return
; single modifier
AaRight:
send !{Right}
return
CaRight:
send ^{Right}
return
SaRight:
send +{Right}
return
; double modifier
ACaRight:
send !^{Right}
return
ASaRight:
send !+{Right}
return
CSaRight:
send ^+{Right}
return
; all modifier
ACSaRight:
send !^+{Right}
return
; ======== utility keys ========
; home
hKey:
send {Home}
return
ChKey:
send ^{Home}
return
ShKey:
send +{Home}
return
CShKey:
send ^+{Home}
return
; end
eKey:
send {End}
return
CeKey:
send ^{End}
return
SeKey:
send +{End}
return
CSeKey:
send ^+{End}
return
; page up
pUp:
send {PgUp}
return
CpUp:
send ^{PgUp}
SpUp:
send +{PgUp}
return
CSpUp:
send ^+{PgUp}
return
; page down
pDown:
send {PgDn}
return
CpDown:
send ^{PgDn}
return
SpDown:
send +{PgDn}
return
CSpDown:
send ^+{PgDn}
return
; windows shift arrow
WSaLeft:
send #+{Left}
return
WSaRight:
send #+{Right}
return
; capslock
cLock:
SetCapsLockState, % (t:=!t) ? "On" : "Off"
return
; ======== function keys ========
function1:
send {F1}
return
Sfunction1:
send +{F1}
return
function2:
send {F2}
return
Sfunction2:
send +{F2}
return
function3:
send {F3}
return
Sfunction3:
send +{F3}
return
function4:
send {F4}
return
Sfunction4:
send +{F4}
return
function5:
send {F5}
return
Sfunction5:
send +{F5}
return
function6:
send {F6}
return
Sfunction6:
send +{F6}
return
function7:
send {F7}
return
function8:
send {F8}
return
function9:
send {F9}
return
function10:
send {F10}
return
function11:
send {F11}
return
function12:
send {F12}
return
; ======== media keys ========
mPrev:
send {Media_Prev}
return
mPause:
send {Media_Play_Pause}
return
mNext:
send {Media_Next}
return
vDown:
send {Volume_Down}
return
vUp:
send {Volume_Up}
return
aDevice:
toggle:=!toggle ;toggles up and down states.
Run, mmsys.cpl
WinWait,Sound ; Change "Sound" to the name of the window in your local language
if toggle
ControlSend,SysListView321,{Down %audioOut1%} ; This number selects the matching audio device in the list, change it accordingly
Else
ControlSend,SysListView321,{Down %audioOut2%} ; This number selects the matching audio device in the list, change it accordingly
ControlClick, &Set Default ; Change "&Set Default" to the name of the button in your local language
ControlClick,OK
return
; ======== extra scrips ========
; lenny replace
:c*:;lenny;::
send ( ͡° ͜ʖ ͡° )
return
; shrug replace
:c*:;shrug;::
send {U+00AF}\_(ツ)_/{U+00AF}
return
;disable function key
nothing:
return