How to remap controller's dpad to combination hotkeys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
reborn
Posts: 8
Joined: 23 Jun 2019, 06:44

How to remap controller's dpad to combination hotkeys

28 Jun 2020, 22:32

I tried remap arrow keys to ctrl+numpad1,2,3,4 but it didn't work,and idk why KeyToHoldDown can only define one sigle key.Can anybody help me figue this out?

Code: Select all

#NoEnv
#Persistent
#IfWinActive, ahk_exe anki.exe

SetTimer, WatchPOV, 5
return

WatchPOV:
GetKeyState, POV, 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%  
    return  

;if KeyToHoldDown
;    Send, {%KeyToHoldDown% down}  
;return

SetKeyDelay -1  
if KeyToHoldDownPrev   
    Send, {%KeyToHoldDownPrev% up}  
if KeyToHoldDown   
    Send, {%KeyToHoldDown% down}  
return
    
Joy2::Space
Joy5::Numpad1
Joy6::Numpad2
Joy8::Numpad3
Joy7::^z
Joy4::r

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RandomBoy and 248 guests