Since yesterday I'm trying figure how to make my Xbox One Controller to invert the state of the button X. By invert I mean, when the button is not physically pressed by me the game see as it's pressed and vice versa. The reason behind this is I'm playing old Megaman X games and want to autocharge the shot.
I've came out with this very simple code, but since xinput buttons cannot be used as Hotkeys directly I'm struggling to think a way around.
Code: Select all
XInput_Init()
Loop {
if (!getKeyState(XINPUT_GAMEPAD_X))
Send, {XINPUT_GAMEPAD_X Down}
else
Send, {XINPUT_GAMEPAD_X Up}
}