[v2.0-beta.3 & v1.x] Joystick not working

Report problems with documented functionality
nicobelic
Posts: 4
Joined: 20 May 2022, 07:18

[v2.0-beta.3 & v1.x] Joystick not working

Post by nicobelic » 20 May 2022, 07:26

[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?
Last edited by nicobelic on 20 May 2022, 18:08, edited 2 times in total.

User avatar
boiler
Posts: 16931
Joined: 21 Dec 2014, 02:44

Re: Joystick not working

Post by boiler » 20 May 2022, 07:56

I can't reproduce the problem with v2.0-beta.3, either 32 or 64 bit.

nicobelic
Posts: 4
Joined: 20 May 2022, 07:18

Re: Joystick not working

Post by nicobelic » 20 May 2022, 16:31

boiler wrote: I can't reproduce the problem with v2.0-beta.3, either 32 or 64 bit.
What version of Windows? I'm on Windows 11.

User avatar
boiler
Posts: 16931
Joined: 21 Dec 2014, 02:44

Re: Joystick not working

Post by boiler » 20 May 2022, 17:06

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.

nicobelic
Posts: 4
Joined: 20 May 2022, 07:18

Re: Joystick not working

Post by nicobelic » 20 May 2022, 17:42

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.

User avatar
boiler
Posts: 16931
Joined: 21 Dec 2014, 02:44

Re: Joystick not working

Post by boiler » 20 May 2022, 17:53

OK. That demonstrates it pretty clearly. I'll move this thread to the Bug Reports section.

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: [v2.0-beta.3 & v1.x] Joystick not working

Post by lexikos » 21 May 2022, 17:36

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.

nicobelic
Posts: 4
Joined: 20 May 2022, 07:18

Re: [v2.0-beta.3 & v1.x] Joystick not working

Post by nicobelic » 21 May 2022, 19:04

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.
Darn.
lexikos wrote:
21 May 2022, 17:36
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.
I'm not quite sure I understand this workaround, could you elaborate in layman's terms please?

lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: [v2.0-beta.3 & v1.x] Joystick not working

Post by lexikos » 23 May 2022, 01:21

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

Post Reply

Return to “Bug Reports”