Skip to content

Instantly share code, notes, and snippets.

View poisonborz's full-sized avatar
🦡
Badgering along

Janos Herman poisonborz

🦡
Badgering along
View GitHub Profile
@poisonborz
poisonborz / XBoxControllerKeys.ahk
Last active September 14, 2021 16:59
Triggering keyboard shortcuts with an XBox (XInput compatible) controller on Windows
/*
Triggers a keyboard shortcut (defined on ln41, currently Ctrl-Alt-F4)
when a specific XBox controller key combination (defined on ln40, currently LB-RB-LT-RT)
on any of a max of 4 controller is pressed. Polls and fires (if controller keys held down) every 3 seconds.
You need 2 additional files for this to work, place them besides this file:
- copy the text here and save it as a file named XInput.ahk: https://www.dropbox.com/s/3ky3wx5stj0uoj9/XInput.ahk?dl=0
- copy xinput1_3.dll from your C:\Windows\System32 folder (should be there if you have DirectX installed)