-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyArrows.ahk
executable file
·54 lines (46 loc) · 1.65 KB
/
MyArrows.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
#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.
!i::
send, {Up down}
return
!k::
send, {Down down}
return
!l::
send, {Right down}
return
!j::
send, {Left down}
return
+!i::
send, {PgUp down}
return
+!k::
send, {PgDn down}
return
+!l::
send, {End down}
return
+!j::
send, {Home down}
return
;$Escape:: ; Long press (> 0.5 sec) on Esc closes window - but if you change your mind you can keep it pressed for 3 more seconds
; KeyWait, Escape, T0.5 ; Wait no more than 0.5 sec for key release (also suppress auto-repeat)
; If ErrorLevel ; timeout, so key is still down...
; {
; KeyWait, Escape, T3 ; Wait no more than 3 more sec for key to be released
; If !ErrorLevel ; No timeout, so key was released
; {
; PostMessage, 0x112, 0xF060,,, A ; ...so close window
; Return
; }
; ; Otherwise,
; KeyWait, Escape ; Wait for button to be released
; ; Then do nothing...
; Return
; }
;
; Send {Esc}
;Return