You can probably do it with some autohotkey script but I don't have an xbox controller to try it
Code:
JoystickNumber = 0
if JoystickNumber <= 0
{
Loop 16 ; Query each joystick number to find out which ones exist.
{
GetKeyState, JoyName, %A_Index%JoyName
if JoyName <>
{
JoystickNumber = %A_Index%
break
}
}
if JoystickNumber <= 0
{
MsgBox The system does not appear to have any joysticks.
ExitApp
}
}
#SingleInstance
SetFormat, float, 03 ; Omit decimal point from axis position percentages.
GetKeyState, joy_buttons, %JoystickNumber%JoyButtons
GetKeyState, joy_name, %JoystickNumber%JoyName
GetKeyState, joy_info, %JoystickNumber%JoyInfo
Loop
{
buttons_down =
Loop, %joy_buttons%
{
GetKeyState, joy%a_index%, %JoystickNumber%joy%a_index%
if joy%a_index% = D
buttons_down = %buttons_down%%a_space%%a_index%
}
GetKeyState, joyx, %JoystickNumber%JoyX
axis_info = X%joyx%
GetKeyState, joyy, %JoystickNumber%JoyY
axis_info = %axis_info%%a_space%%a_space%Y%joyy%
IfInString, joy_info, Z
{
GetKeyState, joyz, %JoystickNumber%JoyZ
axis_info = %axis_info%%a_space%%a_space%Z%joyz%
}
IfInString, joy_info, R
{
GetKeyState, joyr, %JoystickNumber%JoyR
axis_info = %axis_info%%a_space%%a_space%R%joyr%
}
IfInString, joy_info, U
{
GetKeyState, joyu, %JoystickNumber%JoyU
axis_info = %axis_info%%a_space%%a_space%U%joyu%
}
IfInString, joy_info, V
{
GetKeyState, joyv, %JoystickNumber%JoyV
axis_info = %axis_info%%a_space%%a_space%V%joyv%
}
IfInString, joy_info, P
{
GetKeyState, joyp, %JoystickNumber%JoyPOV
axis_info = %axis_info%%a_space%%a_space%POV%joyp%
}
ToolTip, %joy_name% (#%JoystickNumber%):`n%axis_info%`nButtons Down: %buttons_down%`n`n(right-click the tray icon to exit)
Sleep, 100
}
return
I have no idea if this works with xinput controllers but if it works,I'll do this
1.Create the script(it's a text file with ahk extension)and run it with the program Autohotkey
2.When the script is running,pressing a button(it will probably not work with the triggers)will display a tooltip with the button name
3.In my case(DInput gamepad)the name for the select button is Joy9(I think or it was the other way around)and for start is Joy10
4.Create an new script(it's a text file with ahk extension)that look for example something like this(there are other methods too but I can't test them)
Code:
~Joy10::
If GetKeyState("Joy9")
Process,Close,pcsx2.exe
Return
What the code above mean is,when the Start button is pressed,autohotkey will check if the Select button is also pressed and if it is,it will try to close a process named pcsx2.exe