forked from lydell/dual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdual.ahk
71 lines (66 loc) · 1.03 KB
/
dual.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
#Include setup.ahk
dual1 := new Dual
test(defaults)
class defaults {
Begin() {
Dual.sentKeys := []
}
tap() {
SendEvent a
assert(sent("a")*)
}
long_tap() {
SendEvent {a down}
Sleep 290
SendEvent {a up}
assert(sent("a")*)
}
timeout() {
SendEvent {a down}
Sleep 510
SendEvent {a up}
assert(sent("LShift")*)
}
no_repetition() {
SendEvent {a down}
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 20
SendEvent {a down}
SendEvent {a up}
assert(sent("a")*)
}
doublePress_repetition() {
SendEvent a
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a up}
Sleep 10
assert(sent("a", "a", "a", "a", "a")*)
}
not_doublePress() {
SendEvent a
Sleep 200
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a down}
Sleep 10
SendEvent {a up}
Sleep 10
assert(sent("a", "a")*)
}
}
*a::
*a UP::dual1.combine("LShift", A_ThisHotkey)