MicrosoftDocs / windows-dev-docs

Conceptual and overview content for developing Windows apps
Creative Commons Attribution 4.0 International
688 stars 1.2k forks source link

Disable gamepad. #622

Closed ZehCastro closed 6 years ago

ZehCastro commented 6 years ago

How should one setup the registry in order to temporarily disable a gamepad or map its inputs to NOPs?

Thanks.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

eliotcowley commented 6 years ago

Hi @ZehCastro, sorry for the late reply. I'll get in touch with the feature team and see if they can help with this.

eliotcowley commented 6 years ago

On the Registry data for game controllers doc, the first key listed, Disabled, will disable the game controller if set to 1. However, this is a very dangerous thing to do, because it disables the game controller for all apps, so you have to remember to remove it. Additionally, this only affects apps that are using Windows.Gaming.Input, or UWP apps using XInput. A safer way to do this would be to build the functionality into your input system.

Hope this helps--if you need further assistance, Windows developer support is a good resource.

ZehCastro commented 6 years ago

Thanks, that does help. It would be really helpful to include more examples of setups like this: https://docs.microsoft.com/en-us/windows/uwp/gaming/registry-data-for-game-controllers#example-registry-file

eliotcowley commented 6 years ago

Unfortunately, they don't have any other examples to give me. Are you trying to add input support to your game controller? I can put you in touch with someone to help if so.

james28909 commented 3 years ago

A developer in know that manages multiple other controller/device input projects has taken their time to help me figure out how to disable this for DS4 v1 controllers (ds4 v2 controllers, that have the light bar in the touch pad, don't have the issue of ui navigation input). This will disable v1 ds4 controller input in UWP apps (UI Navigation) like start menu and settings and MS store etc.

The developer that figured it out Is located here - https://steamcommunity.com/id/FirstPlato/ and here - https://forzatools.weebly.com/about.html

the developer is very knowledgeable and manages multiple projects regarding controller/device input and feedback. It is working great for me and works fine and doesn't require you to run a fix every time you reboot. It is a simple reg edit. And I REPEAT IT IS FOR DS4 v1 only (ds4 v2 doesn't have this issue).

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005]
"Disabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005\Gamepad]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005\Gamepad\UINavigation]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005\Gamepad\UINavigation\PrimaryUp]
"AxisIndex"=dword:00000012
"Inverted"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005\UINavigation]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GameInput\Devices\054C05C400010005\UINavigation\PrimaryUp]
"AxisIndex"=dword:00000012
"Inverted"=dword:00000001

just copy paste the code into a .reg file named whatever you want, like "ds4_ui_fix.reg" and run it. Then unpair and reboot and pair and try it out.