try:
Code: Select all
#Requires AutoHotkey v2.0
; instructs AHK to only do these conversions
; when an Notpad window is active
#HotIf WinActive("ahk_exe notepad.exe")
Numpad1::Alt
NumpadEnd::Alt
Numpad2::MButton
NumpadDown::MButton
#HotIf
Code: Select all
#Requires AutoHotkey v2.0
; instructs AHK to only do these conversions
; when an Notpad window is active
#HotIf WinActive("ahk_exe notepad.exe")
Numpad1::Alt
NumpadEnd::Alt
Numpad2::MButton
NumpadDown::MButton
#HotIf
Code: Select all
x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P") {
SendEvent,% "{" Keys[++N:=Mod(N, 8)] "}"
Sleep, 50
}
SendEvent, {a Up}{w Up}{d Up}{s Up}
Return
Code: Select all
#Requires AutoHotkey v2.0
$Up::Send(Keywait("Up", "T.5")?"{Up}":"q"), Keywait("Up")
$Down::Send(Keywait("Down", "T.5")?"{Down}":"w"), Keywait("Down")
Code: Select all
x::
N:=0, Keys:=["w Down","a Up","d Down"
,"w Up","s Down","d Up","a Down","s Up"]
While, GetKeyState("x","P")
SendInput,% "{" Keys[++N:=Mod(N, 8)] "}"
Send, {a Up}{w Up}{d Up}{s Up}
Return
Code: Select all
#Requires AutoHotkey v2.0
F12:: {
if KeyWait("RAlt", "d")
MsgBox("AltGr or RAlt")
}
Code: Select all
LAlt::SoundBeep ; left Alt Key: triggered on keydown input
RAlt::SoundBeep ; right Alt Key: triggered on keydown input
Code: Select all
F8::
IF Down := !Down { ; toggles Left and Right mouse button down/up
ControlClick,, ahk_exe java.exe,, Left,, D
ControlClick,, ahk_exe java.exe,, Right,, D
} Else {
ControlClick,, ahk_exe java.exe,, Left,, U
ControlClick,, ahk_exe java.exe,, Right,, U
} Return
Code: Select all
q::SoundBeep ; triggered on keydown input
Control::SoundBeep ; triggered on keyup input