Joystick problems with Windows 10 anniversary update

Report problems with documented functionality
dennis
Posts: 4
Joined: 07 Aug 2016, 05:02

Joystick problems with Windows 10 anniversary update

07 Aug 2016, 05:14

Hello AHK,

I've noticed that with both my PC's with the Windows 10 anniversary update all joystick controls are not working (The joystick is detected).
The same script on my laptop (Windows 10, but without the anniversary update) does work.
I've run my own script and the joystick test script (https://autohotkey.com/docs/scripts/JoystickTest.htm).
The joystick I'm using is an Xbox One controller and using the latest ahk 1.1.24.01. Tested the scripts both wireless and wired.

Kind regards, Dennis
dennis
Posts: 4
Joined: 07 Aug 2016, 05:02

Re: Joystick problems with Windows 10 anniversary update

09 Aug 2016, 03:10

Found a little bit more information, it has probably to do with the exclusive mode problem:

https://inputmapper.com/20-windows-10-1 ... e-mode-fix
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Joystick problems with Windows 10 anniversary update

09 Aug 2016, 05:48

It appears that "exclusive mode" is unique to InputMapper and has nothing to do with AutoHotkey, or Xbox One controllers.
When you plug in a DS4 controller, windows will recognize it as a basic game controller. Using DS4 / InputMapper, the software will add an additional controller but not remove the other one.
Exclusive mode will hide the basic controller, allowing for exclusive access to the emulated 360 controller. This removes the possibility of conflicts, where certain games will be confused by two controllers.
Source: PSA: Windows 10 can't use Dual Shock 4 controller in exclusive mode : pcgaming
I have confirmed that my Xbox One controller does not work with the Multimedia Joystick API after the anniversary update, but my Xbox 360 controller does. This is clearly a bug of Windows 10.
dennis
Posts: 4
Joined: 07 Aug 2016, 05:02

Re: Joystick problems with Windows 10 anniversary update

09 Aug 2016, 06:31

Thank you lexikos for confirming. Hope MS fixes it soon!
Joaim
Posts: 5
Joined: 20 Jun 2016, 12:59

Re: Joystick problems with Windows 10 anniversary update

27 Aug 2016, 13:31

Feels bad man, I really used ahk for a lot of games on my pc with my xbox one controller. Do you guys think there would be any way around this? any fix at all before MS fixes this (if they even will).
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Joystick problems with Windows 10 anniversary update

18 Feb 2017, 05:48

Can anyone whose Xbox One controller is not working with AutoHotkey please try this:

Open the script's main window; i.e. double click the tray icon, or call ListVars/ListLines/ListHotkeys/KeyHistory.

While the window is active, see if AutoHotkey detects its input. (Edit: With a joystick hotkey or GetKeyState, of course.)

If you have some other kind of controller, please tell me whether it works without the window active.
dennis
Posts: 4
Joined: 07 Aug 2016, 05:02

Re: Joystick problems with Windows 10 anniversary update

18 Feb 2017, 08:18

Hello Lexikos,

I tried the Joystick test script with a Xbox One controller and it does indeed work when the "Lines most recently executed" window is active.
jumper1
Posts: 4
Joined: 24 Feb 2017, 11:16

Re: Joystick problems with Windows 10 anniversary update

24 Feb 2017, 14:11

Did anyone manage to make the Xbox one controller work with AHK?
jumper1
Posts: 4
Joined: 24 Feb 2017, 11:16

Re: Joystick problems with Windows 10 anniversary update

24 Feb 2017, 14:26

lexikos wrote:Can anyone whose Xbox One controller is not working with AutoHotkey please try this:

Open the script's main window; i.e. double click the tray icon, or call ListVars/ListLines/ListHotkeys/KeyHistory.

While the window is active, see if AutoHotkey detects its input. (Edit: With a joystick hotkey or GetKeyState, of course.)

If you have some other kind of controller, please tell me whether it works without the window active.
If I use the script:

Code: Select all

Joy1::
Send {vkC3 down} 
sleep, 100
Send {vkC3 up}
Return
in my Windows 10 anniversary update, the key press is correctly detected.

Code: Select all

Window: C:\Users\Mohammad Ashraful An\Downloads\AutoHotkey_1.1.24.05\xbox.ahk - AutoHotkey v1.1.24.05
Keybd hook: no
Mouse hook: no
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) = 
Modifiers (Hook's Logical) = 
Modifiers (Hook's Physical) = 
Prefix key is down: no

NOTE: Only the script's own keyboard events are shown
(not the user's), because the keyboard hook isn't installed.

NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script.  The same method can be used to change the size of the history buffer.  For example: #KeyHistory 100  (Default is 40, Max is 500)

The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist, U=Unicode character (SendInput).

VK  SC	Type	Up/Dn	Elapsed	Key		Window
-------------------------------------------------------------------------------------------------------------
C3  000	i	d	11.06	not found      	C:\Users\Mohammad Ashraful An\Downloads\AutoHotkey_1.1.24.05\xbox.ahk - AutoHotkey v1.1.24.05
C3  000	i	u	0.13	not found      	
Press [F5] to refresh.
However, if I run

Code: Select all

^j::
Send {Joy1 down} 
sleep, 100
Send {Joy1 up}
Return
Nothing is generate if I press Ctrl+j (just the Ctrl+j is detected).

Code: Select all

Window: C:\Users\Mohammad Ashraful An\Downloads\AutoHotkey_1.1.24.05\xbox.ahk - AutoHotkey v1.1.24.05
Keybd hook: no
Mouse hook: no
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) = 
Modifiers (Hook's Logical) = 
Modifiers (Hook's Physical) = 
Prefix key is down: no

NOTE: Only the script's own keyboard events are shown
(not the user's), because the keyboard hook isn't installed.

NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script.  The same method can be used to change the size of the history buffer.  For example: #KeyHistory 100  (Default is 40, Max is 500)

The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist, U=Unicode character (SendInput).

VK  SC	Type	Up/Dn	Elapsed	Key		Window
-------------------------------------------------------------------------------------------------------------
A2  01D	i	u	12.36	LControl       	C:\Users\Mohammad Ashraful An\Downloads\AutoHotkey_1.1.24.05\xbox.ahk - AutoHotkey v1.1.24.05
Press [F5] to refresh.

My ultimate goal is to generate the Xbox One controller A key press every 20 seconds.

Thanks
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Joystick problems with Windows 10 anniversary update

24 Feb 2017, 18:14

That has nothing to do with this topic. You can't send joystick buttons. The OS doesn't provide that capability.
jumper1
Posts: 4
Joined: 24 Feb 2017, 11:16

Re: Joystick problems with Windows 10 anniversary update

25 Feb 2017, 16:14

Ah, so I should not be looking for a solution as it does not exist at all?
func
Posts: 47
Joined: 20 May 2016, 20:52

Re: Joystick problems with Windows 10 anniversary update

26 Mar 2017, 05:21

I'm having this same problem with a new xbox pc controller. It looks like an xbox one controller.
The test joystick script works when I press the buttons on the controller if the script's main window (double click tray icon) is active. But it doesn't work when it's not active. Why is this? Is there some way I can make autohotkey work as if the window is active when it's not?

I tried xinput - not only is the original source link dead, but the latest edit at the end of the thread didn't work for me at all. The test script didn't even work out of the box to run, after making it work, the script itself (xinput and so on) didn't work with my controller.

Also, the disable-exclusion-mode .exe from earlier in this thread did nothing to help the problem as well.
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Joystick problems with Windows 10 anniversary update

26 Mar 2017, 06:08

Microsoft apparently changed XInput controllers to work that way in the anniversary update.

The download links for XInput.ahk broke when Dropbox removed Public folders. I've posted a later version here.
FigBird

Re: Joystick problems with Windows 10 anniversary update

28 Dec 2017, 19:33

I got it to work people! :)

To do this, I had to manually roll back the drivers installed for 'Xbox Peripherals' and 'Human Interface Devices' in device manager.
Instructions:

1) Download xb1usb.11059.0.140526x64.msi (do a google search). These are the windows 7/8/8/1 drivers for XB1 Controller
2) Open device manager
3) Install xb1usb.11059.0.140526x64.msi
4) Manually update (browse my computer for driver software) > (let me pick from a list of device drivers) the 'Xbox Controller' in 'Xbox Peripherals' to 'Xbox Gaming Device Version 6.2.11059'
5) Under 'Human Interface Devices' you may now have a Disbaled Driver/ Driver with an Error/ Driver that can't start. Repeat step 4 BUT choose 'HID-compliant-device' as the driver.
6) Run the JoystickTest.ahk (google search) and you should see Button inputs!

I hope this helps someone :)
Key334

Re: Joystick problems with Windows 10 anniversary update

18 Jan 2018, 11:33

I had to log on here to say thank you for the update on how to fix this... you have saved me countless hours of headache trying to get my controller to work with AHK on windows 10!!!
Guest

Re: Joystick problems with Windows 10 anniversary update

23 May 2018, 04:48

Installing an old driver for the Xbone controller fixes AHK but then newer Windows Store games like Forza Horizon 3 don't recognize it. We still need a version of AHK that supports the newer driver model. Interestingly, Xbox 360 controllers are unaffected.
wojtasskorcz
Posts: 2
Joined: 11 Sep 2019, 13:00

Re: Joystick problems with Windows 10 anniversary update

11 Sep 2019, 13:19

FigBird wrote:
28 Dec 2017, 19:33
I got it to work people! :)

To do this, I had to manually roll back the drivers installed for 'Xbox Peripherals' and 'Human Interface Devices' in device manager.
Instructions:

1) Download xb1usb.11059.0.140526x64.msi (do a google search). These are the windows 7/8/8/1 drivers for XB1 Controller
2) Open device manager
3) Install xb1usb.11059.0.140526x64.msi
4) Manually update (browse my computer for driver software) > (let me pick from a list of device drivers) the 'Xbox Controller' in 'Xbox Peripherals' to 'Xbox Gaming Device Version 6.2.11059'
5) Under 'Human Interface Devices' you may now have a Disbaled Driver/ Driver with an Error/ Driver that can't start. Repeat step 4 BUT choose 'HID-compliant-device' as the driver.
6) Run the JoystickTest.ahk (google search) and you should see Button inputs!

I hope this helps someone :)
Sorry for the necromancy but I didn't know where to put it. Is there any plan to get AHK working with the latest drivers. This workaround always worked fine for me but today I installed the latest Windows update and it must've updated the controller drivers too. Downgrading them didn't work this time, unfortunately. In step 5 I didn't have any device with an error/warning.
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Joystick problems with Windows 10 anniversary update

11 Sep 2019, 16:53

Not at this time.

You may use one of the XInput scripts as a workaround.
wojtasskorcz
Posts: 2
Joined: 11 Sep 2019, 13:00

Re: Joystick problems with Windows 10 anniversary update

13 Sep 2019, 09:53

Found a solution! I ran JoystickTest.ahk and after a few uninstall/upgrade driver tries it finally detected my controller. Strangely my script still didn't work. By analyzing the JoystickTest.ahk script I learned that there may be multiple joysticks detected in a system. I had to replace

Code: Select all

$Joy7::
with

Code: Select all

$2Joy7::
because my controller was recognized as Joystick #2

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 46 guests