-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDouble Typing Fix.ahk
137 lines (127 loc) · 2.12 KB
/
Double Typing Fix.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
#Persistent ; Keep the script running
SetTitleMatchMode, 2 ; Allow for partial window title matching
delay := 90
lastKeyPressTime := {}
; New hotkeys for lowercase ABC.
$a::
$b::
$c::
$d::
$e::
$f::
$g::
$h::
$i::
$j::
$k::
$l::
$m::
$n::
$o::
$p::
$q::
$r::
$s::
$t::
$u::
$v::
$w::
$x::
$y::
$z::
; New hotkey for uppercase ABC:
+A:: ; Shift + A
+B:: ; Shift + B
+C:: ; Shift + C
+D:: ; Shift + D
+E:: ; Shift + E
+F:: ; Shift + F
+G:: ; Shift + G
+H:: ; Shift + H
+I:: ; Shift + I
+J:: ; Shift + J
+K:: ; Shift + K
+L:: ; Shift + L
+M:: ; Shift + M
+N:: ; Shift + N
+O:: ; Shift + O
+P:: ; Shift + P
+Q:: ; Shift + Q
+R:: ; Shift + R
+S:: ; Shift + S
+T:: ; Shift + T
+U:: ; Shift + U
+V:: ; Shift + V
+W:: ; Shift + W
+X:: ; Shift + X
+Y:: ; Shift + Y
+Z:: ; Shift + Z
; New hotkeys for numeric keys.
$0::
$1::
$2::
$3::
$4::
$5::
$6::
$7::
$8::
$9::
; New hotkeys for numeric keys and NumPad keys.
$Numpad0::
$Numpad1::
$Numpad2::
$Numpad3::
$Numpad4::
$Numpad5::
$Numpad6::
$Numpad7::
$Numpad8::
$Numpad9::
; New hotkey for operation keys.
$Enter::
$BackSpace::
$Space::
$Shift::
; New hotkey for special keys.
$"::
$?::
$`:: ; Backtick
$':: ; Single quote
$;:: ; Semicolon
$,:: ; Comma
$.:: ; Period
$!:: ; Exclamation mark
$^:: ; Caret
$&:: ; Ampersand
$*:: ; Asterisk
$(:: ; Left parenthesis
$):: ; Right parenthesis
$-:: ; Hyphen (minus sign)
$_:: ; Underscore
$+:: ; Plus sign
${:: ; Braces (curly brackets)
$}:: ; Braces (curly brackets)
$[:: ; Square brackets
$]:: ; Square brackets
$|:: ; Vertical bar (pipe)
$\:: ; Backslash
$/:: ; Forward slash
$=:: ; Equal Sign
$<::
$>::
key := SubStr(A_ThisHotkey, 2) ; Extract the pressed key
current_time := A_TickCount
if (!lastKeyPressTime[key] or (current_time - lastKeyPressTime[key] >= delay)) {
; Allow key press
lastKeyPressTime[key] := current_time
Send, {%key%}
} else {
; Block key press
Tooltip, Key %key% blocked!
SetTimer, RemoveTooltip, 1000
}
return
RemoveTooltip:
Tooltip
return