Created
August 13, 2023 07:10
-
-
Save Qyriad/e11bdf585c4438fd4fcee75fcccf25ed to your computer and use it in GitHub Desktop.
Make controller/gamepad input work in Windows 11 Task View
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires AutoHotkey v2.0 | |
| ; Joy1 is A | |
| #HotIf WinActive("Task View") | |
| Joy1::Send "{Enter}" | |
| ; Joy2 is B | |
| #HotIf WinActive("Task View") | |
| Joy2::Send "{Escape}" | |
| ; Joy3 is X | |
| #HotIf WinActive("Task View") | |
| Joy3::Send "{Tab}" | |
| while true | |
| { | |
| WinWaitActive("Task View") | |
| key := "" | |
| while true | |
| { | |
| dpad := GetKeyState("JoyPOV") | |
| switch dpad | |
| { | |
| case -1: | |
| ; Key was released. Send it and reset state. | |
| Send key | |
| key := "" | |
| case 9000: | |
| key := "{Right}" | |
| case 27000: | |
| key := "{Left}" | |
| case 0: | |
| key := "{Up}" | |
| case 18000: | |
| key := "{Down}" | |
| } | |
| } | |
| sleep 10 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment