0

I have created a UWP application that polls an Xbox Controller and does various tasks with the user input. I have a problem whereby the controller is able to interact with, and control the UI. I have played around with IsFocusEngagementEnabled which does almost what I want, but not quite. With this enabled, the control of the UI is prevented (even if I have to add the control to every user accessible control), however, the use of the select key, as documented, then allows interaction with the UI. Is there a away to completely disable UI/application interaction, except for where I explicitly use the Gamepad class?

Thanks

aj1
  • 23
  • 1
  • 4
  • I'm confused about your scenario, at the beginning you said the controller does tasks with the user input, and then you want to prevent the Xbox controller input? What kind of tasks that you want to do without interacting with controls even like buttons or textbox? – Roy Li - MSFT Feb 12 '20 at 07:05
  • I'm using the controller input to generate data in the background. This data is transmitted to a remote device to process. Because of this, I don't want the UWP side to actually interact with the controller, only read the input, and transmit. – aj1 Feb 13 '20 at 00:45
  • What about setting the IsEnable property to false? – Roy Li - MSFT Feb 13 '20 at 07:29

1 Answers1

0

This is a solution that involves rolling back the Xinput driver to an older one that does not support UWP.

1. Download the cab file "Microsoft - Game Devices, Other hardware - XBOX 360 Controller For Windows" Last Updated "8/12/2009" Size "2.5 MB" from: https://www.catalog.update.microsoft.com/Search.aspx?q=%20Microsoft%20-%20Game%20Devices%2C%20Other%20hardware%20-%20XBOX%20360%20Controller%20For%20Windows%20

2. Use 7-Zip to extract the cab file. This will result in a folder that contains:

  • two folders "x64" & "x86"
  • and three files: "INF Failures.txt", "xusb21.cat", & "xusb21.inf".

Open "control panel" and search for and navigate to "device manager".

4. In "device manager", if you have an Xinput controller plugged in, when you scroll down you will eventually see "Xbox 360 Perphearals". Click it.

5. Right click on "Xbox 360 Controller for Windows" and select "Update Driver Software".

6. Click on "Browse my computer for driver software".

7. Click on "Let me pick from a list of device drivers on my computer".

8. Click on "Have Disk..." in the lower right corner of the window.

9. Click on "Browse..." and navigate into the extracted folder from earlier that contains the driver.

10. Select the "xusb21.inf" file then click "Open".

11. Click "OK".

12. Click "Next" then the driver should install.

13. You will be asked to "restart your computer". Do it when you are ready so that the changes will go into effect.

14. You should be all set. Hopefully this will work for you.

vectorjon
  • 31
  • 6