[v2.0-beta.3 & v1.x] Joystick not working
[v2.0-beta.3 & v1.x] Joystick not working
[Mod edit: This topic was moved from the "v2 Help" section. It appears it may be a Windows 11-specific issue.]
This has been reportedly fixed, according to this topic however, with the latest v2.0-beta.3 version or v1 versions, this simple script does not work. Nothing happens when I hit the Joy7 button on the gamepad:
Joy7::MsgBox("You pressed a button.")
What's interesting however, is if I double click the running script from my notification area (beside the Windows clock) and the AHK interface shows up, the script works without issue, and the Joy7 button press launches the message box. It only works with the window open however, which is not very useful.
Seems the bug is still present?
This has been reportedly fixed, according to this topic however, with the latest v2.0-beta.3 version or v1 versions, this simple script does not work. Nothing happens when I hit the Joy7 button on the gamepad:
Joy7::MsgBox("You pressed a button.")
What's interesting however, is if I double click the running script from my notification area (beside the Windows clock) and the AHK interface shows up, the script works without issue, and the Joy7 button press launches the message box. It only works with the window open however, which is not very useful.
Seems the bug is still present?
Last edited by nicobelic on 20 May 2022, 18:08, edited 2 times in total.
Re: Joystick not working
I can't reproduce the problem with v2.0-beta.3, either 32 or 64 bit.
Re: Joystick not working
What version of Windows? I'm on Windows 11.boiler wrote: I can't reproduce the problem with v2.0-beta.3, either 32 or 64 bit.
Re: Joystick not working
I'm using Windows 10. I can't test it on Windows 11.
If you haven't yet, you might want to try the Joystick Test Script and see if that might shed any light.
If you haven't yet, you might want to try the Joystick Test Script and see if that might shed any light.
Re: Joystick not working
boiler wrote: I'm using Windows 10. I can't test it on Windows 11.
If you haven't yet, you might want to try the Joystick Test Script and see if that might shed any light.
I made a quick video showing/proving the issue/bug:
Same issue occurs with the Joystick Test Script:
I should also note the issue is present in the v1 releases as well.
Re: Joystick not working
OK. That demonstrates it pretty clearly. I'll move this thread to the Bug Reports section.
Re: [v2.0-beta.3 & v1.x] Joystick not working
This is a known peculiarity of the Xbox controller driver on newer versions of Windows 10 (and now confirmed on 11) with relation to the legacy joystick API used by AutoHotkey. Call it a bug or a limitation, either way it isn't going to be fixed any time soon. There is nothing that can be done within AutoHotkey, short of completely replacing the joystick API with DirectInput or XInput.
One of the XInput scripts can be used as a workaround. XInput is also the only way to detect when both triggers are being pulled simultaneously.
One of the XInput scripts can be used as a workaround. XInput is also the only way to detect when both triggers are being pulled simultaneously.
Re: [v2.0-beta.3 & v1.x] Joystick not working
Darn.lexikos wrote: This is a known peculiarity of the Xbox controller driver on newer versions of Windows 10 (and now confirmed on 11) with relation to the legacy joystick API used by AutoHotkey. Call it a bug or a limitation, either way it isn't going to be fixed any time soon. There is nothing that can be done within AutoHotkey, short of completely replacing the joystick API with DirectInput or XInput.
I'm not quite sure I understand this workaround, could you elaborate in layman's terms please?
Re: [v2.0-beta.3 & v1.x] Joystick not working
Use a different method of querying the status of the controller, such as one of the library scripts that have been created for that purpose.
search.php?keywords=xinput&terms=all&author=&fid%5B%5D=6&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
search.php?keywords=xinput&terms=all&author=&fid%5B%5D=6&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search