-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKeywait_Alternative.ahk
130 lines (115 loc) · 2.15 KB
/
Keywait_Alternative.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
#SingleInstance force
#Persistent ; Keep this script running until the user explicitly exits it.
;#Warn ; Enable warnings to assist with detecting common errors.
Layer := 1
CapsLock_pressed := 0
c_pressed := 0
F18_pressed := 0
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff
Process, Priority, , A
SetTitleMatchMode, 2
;#HotkeyInterval 2000 ; This is the default value (milliseconds).
#MaxHotkeysPerInterval 500
;#InstallKeybdHook
;#InstallMouseHook
CoordMode, mouse, Screen
{ ; Monitoring Windows
BlockInput, On
KeyHistory
WinGetActiveTitle, Title
WinWait, %Title%
SetKeyDelay 10, 32
Send {Lwin down}{Right}{Right}{Right}{Right}{Lwin up}{LControl down}{k}{LControl Up}
#IfWinExist Event Tester
{
WinClose Event Tester
Run, C:\Program Files (x86)\Thrustmaster\TARGET\Tools\EventTester.exe
WinWait, Event Tester
SetKeyDelay 10, 32
Send {Lwin down}{Right}{Right}{Lwin up}{esc}{esc}{esc}{esc}
Sleep 100
MouseClick, left, 1950, 70
MouseClick, left, 2016, 95
BlockInput, Off
return
}
#IfWinExist
}
{ ; AutoHotKey Script option.
#F3::Suspend, Toggle
#F4::ExitApp
;^SPACE:: Winset, Alwaysontop, , A ; Toggle Active Windows Always on Top.
^!f:: ; FullScreen Window. Control+Alt+F
{
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
WinSet, Style, ^0xC00000 ; toggle title bar
WinMove, , , 0, 0, 1920, 1080
}
return
}
} ; AutoHotKey Script option.
{ ; Layer modifier. Press and hold to get into Layer 2. Release to come back to Layer 1.
CapsLock:: ;Key disabled by "SetCapsLockState, AlwaysOff".
{
If (CapsLock_pressed)
Return
CapsLock_pressed := 1
Layer := 2
Return
}
CapsLock Up::
{
CapsLock_pressed := 0
Layer := 1
Return
}
}
$c::
{
If (c_pressed)
Return
c_pressed := 1
If (Layer=1)
{
SendInput {c Down}
}
If (Layer=2)
{
SendInput {, Down}
}
Return
}
$c Up::
{
c_pressed := 0
If (Layer=1)
{
If (GetKeyState(","))
{
SendInput {, Up}
}
Else
SendInput {c Up}
}
If (Layer=2)
{
If (GetKeyState("c"))
{
SendInput {c Up}
}
Else
SendInput {, Up}
}
Return
}
F18::
If (F18_pressed)
Return
F18_pressed := 1
Return
F18 Up::
F18_pressed := 0
Return