Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;rev1
- ;https://www.autohotkey.com/
- SetWorkingDir %A_ScriptDir%
- #Include %A_ScriptDir%
- #SingleInstance ignore
- #Persistent
- SetTimer, WatchPOV, 5
- return
- WatchPOV:
- POV := GetKeyState("JoyPOV")
- KeyToHoldDownPrev := KeyToHoldDown
- if (POV < 0)
- KeyToHoldDown := ""
- else if (POV > 31500)
- KeyToHoldDown := "Up"
- else if POV between 0 and 4500
- KeyToHoldDown := "Up"
- else if POV between 4501 and 13500
- KeyToHoldDown := "Right"
- else if POV between 13501 and 22500
- KeyToHoldDown := "Down"
- else
- KeyToHoldDown := "Left"
- if (KeyToHoldDown = KeyToHoldDownPrev)
- {
- if KeyToHoldDown
- Send, {%KeyToHoldDown% down}
- return
- }
- SetKeyDelay -1
- if KeyToHoldDownPrev
- Send, {%KeyToHoldDownPrev% up}
- if KeyToHoldDown
- Send, {%KeyToHoldDown% down}
- return
- $Joy1::
- {
- SetKeyDelay 30,50
- Send, {ALT DOWN}{TAB}{ALT UP}
- }
- return
- $Joy2::
- Send {Space down}
- SetTimer, WaitForJoy2, 30
- return
- WaitForJoy2:
- if not GetKeyState("Joy2")
- {
- Send, {Space up}
- SetTimer, WaitForJoy2, Off
- return
- }
- Send, {Space down}
- return
- $Joy3::Send, +,
- $Joy4::Send, ^r
- $F12::Suspend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement