This is what i use in the AutoHotkey tab of each emulator. It allows exiting emulators by holding the back + start for 2 seconds on first xbox360 pad or holding player1 + player2 for 2 seconds on the Tankstick.
~1joy7 & 1joy8::
Duration=0
Loop
{ Duration ++
If !GetKeyState("1joy7","P") || !GetKeyState("1joy8","P")
Break
If Duration > 2
{
Process, Close, {{{StartupEXE}}}
break
}
Sleep, 1000
}
return
~1 & 2::
Duration=0
Loop
{ Duration ++
If !GetKeyState("1","P") || !GetKeyState("2","P")
Break
If Duration > 2
{
Process, Close, {{{StartupEXE}}}
break
}
Sleep, 1000
}
return