microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.32k stars 676 forks source link

End user option to disable controller input in UWP apps, especially non-games. #1496

Closed JoshWobbles closed 4 years ago

JoshWobbles commented 4 years ago

Describe the bug UWP Controller support cannot be disabled. leading to unwanted controller input in applications that have no business reading controller input, such as the Start menu. This can even lead to the random selection and unwanted scrolling when Windows interprets the inputs incorrectly.

Steps to reproduce the bug Connect a DirectInput type of controller, hotas etc Launch UWP app, or even start menu Disconnect controller and watch cursor and scrolling go crazy

Expected behavior Controller input in non games should be OPT IN and have the option to disable completely. Windows is after all a operating system and it is absurd to think we are all playing games all the time.

Screenshots

Version Info Windows 10 1903

NuGet package version:

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop
Mobile
Xbox
Surface Hub
IoT

Additional context STOP treating Microsoft PC's like game consoles!

shaheedmalik commented 4 years ago

This is absurd. I actually want UWP experiences to be controller capatible. You want Microsoft to disable something for a unlicensed third party app?

JoshWobbles commented 4 years ago

I want it to be opt in, as in optional, as in my computer isn't a game console so don't introduce bugs into simple start menu navigation when I don't want it....

shaheedmalik commented 4 years ago

If I leave something on my keyboard, should developers remove keyboard functionality because of it?

UWP apps are designed more than just Windows desktops. A game controller is an input device such as a mouse, headset, or keyboard. Just unplug your controller.

JoshWobbles commented 4 years ago

Unplugging the controller causes the random scrolling. I did mention that just like I mentioned that it should be opt in, not removed....

Nirmal4G commented 4 years ago

I have not seen these issues, when I use my controller on my PC (both laptop/desktop).

I play games sometimes in the middle of coding when I get stuck. When I get an idea or solution to my problem during the play, I'll switch to write code / note an idea using the chatpad on my controller (sometimes, I'll even run a quick debug of the program using the controller with chatpad), then I'll switch back to gaming.

To me, it was seamless, then again, It took a little while to adjust to the behaviors of the controller!

Nirmal4G commented 4 years ago

@JoshWobbles

You see, the root of the problem is not the input device, it's the bugs. So, ask @microsoft to fix the bugs.

Note: People will always use something we create in ways we didn't even imagine or we didn't want them to.

Sure, you can argue that I have not got the resources to support the other input devices, you don't have to, you just need to adjust their behavior to your application.

For system components such as Start Menu (Xaml/WinRT), File Explorer (DUI/Win32), Xbox App (React/Electron), you can also file a feedback in the Insider Hub App and link the GitHub issue there.

Update

I read the other issues, I see what you got there, when using input mapping, these issues do happen because both the mapping app and system process the input simultaneously.

What I would do

Since UWP Apps support XInput, you can blacklist them from the Mapping app. So that the mapping doesn't apply to those apps. Do they support blacklisting apps? If not, you can request them. They would deliver them (sooner) instead of asking MSFT to do a feature addition to Windows itself. I've also sent a feedback to the team about this issue.

joaodforce commented 4 years ago

Update

I read the other issues, I see what you got there, when using input mapping, these issues do happen because both the mapping app and system process the input simultaneously.

What I would do

Since UWP Apps support XInput, you can blacklist them from the Mapping app. So that the mapping doesn't apply to those apps. Do they support blacklisting apps? If not, you can request them. They would deliver them (sooner) instead of asking MSFT to do a feature addition to Windows itself.

https://github.com/microsoft/microsoft-ui-xaml/issues/1495#issuecomment-546594322

JoshWobbles commented 4 years ago

@Nirmal4G I dont use a mapping app for my HOTAS, it is natively supported in games. HOTAS means Hands On Throttle And Stick, its not an app or a mapping application, it's basically shorthand for a throttle and stick setup for simulators.

Nirmal4G commented 4 years ago

@JoshWobbles

I know, I was talking in general, the side of input modality in windows, you know how the system calls intercept from the input devices and send them through driver filter and all that...!

Since, they have like a universal driver for the device, the devs can implement a filter that could work correctly in non-game regions in the OS. But I don't see them putting a switch in settings anytime soon.

There are lot of feedback like that in the insider hub, even one of mine, where I had a similar problem with a custom controller. As I said previously, You can file it in the insider hub and track the issue there.

JoshWobbles commented 4 years ago

@Nirmal4G I think you may be referring to a double input, which I am not experiencing, the issue I am having is that my throttle and sliders map to what Windows believes is a X & Y and is trying to navigate start menu and etc based on the position of the throttle and my air brake slider. When the HOTAS is unplugged these values must default to the maximum even though the device is no longer present because the start menu just scrolls all the way to the bottom as soon as it is opened with no input. Im guess whatever wrapper for the controller the UWP is creating is not being properly disposed on removal. Either way, I see this as a feature that should be optional because even my Space Navigator mouse has shown some weird behaviors now too.

Ive never had any success on the insider or feed back hub, ive been trying to get them to fix HDR and Dolby Atmos audio forever...

Nirmal4G commented 4 years ago

HDR and Dolby Atmos are known issues, so they'll fix them by next major update.

Nirmal4G commented 4 years ago

Im guess whatever wrapper for the controller the UWP is creating is not being properly disposed on removal.

This, they can do a fix.

Either way, I see this as a feature that should be optional...

I agree, at least on Windows Desktop editions.

JoshWobbles commented 4 years ago

HDR and Dolby Atmos are known issues, so they'll fix them by next major update.

I'm not holding my breath, been a mess for over a year now lol

Nirmal4G commented 4 years ago

I'm currently using LG 55" C7 OLED, Vision and Atmos is working in some cases but not HDR. I think the issue is on both sides, LG has a crappy Game mode support, even in C9, it has not improved at all.

And more over, @Microsoft needs to have a reference panel for OLED that the consumers use and not the signage ones. That way they'll literally see the problem we're facing!!! 😜 🤣

Austin-Lamb commented 4 years ago

I'm going to close this as a duplicate of #1495 - please see the last comment I put there before that issue was closed. I'll work with the input team internally to get any additional information added to 1495.

james28909 commented 3 years ago

Sorry for the double post. 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).

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.

Adrenesis commented 3 years ago

@shaheedmalik and @Nirmal4G

We really don't care about what works for you and your dumb useless workaround, I'm a video game dev, I do stuff with controller, this is a working machine not a random input party.

This feature is NOT usable as INCOMPLETE, this anti-feature shouldn't be enabled by default, my OS behaviour should not changed without my consent, and egoist people like you have nothing to do on git repository sites, we are not trying to determine what's your stuff, we are trying to determine what should be an acceptable OS behaviour for everyone.

This is not complicated, consent, now with me, CONSENT, consent is mandatory not optionnal, I didn't subscribe to Microsoft's beta, I shouldn't have beta feature coming in my way, when I'm WORKING.

This issue has been going for 2 years now, still there is no fix, I waited on 7 as much as I can but python dropped support I had to switch to 10, last week has been a workaround party because the OS is bad by design and people like you keeps denying the whole big issue with all that.

This is so frustrating, not only working on this computer is a mess, but also I have to see people like you completely out of reality talking about Steam Input and stuffs on the microsoft forum to deny the fact that Microsoft shouldn't slide their broken stuffs (to say the least) into the OS.

Nirmal4G commented 3 years ago

We really don't care about what works for you and your dumb useless workaround…

May be you don't but @Microsoft does!

…egoist people like you have nothing to do on git repository sites…

Are you not one, then? 🧐

…OS is bad by design and people like you keeps denying the whole big issue with all that.

I'm not. Windows is made-for-profit by design. Understand that! and then, come yell at everyone. Besides, I'm not against you here. I pushed Xbox dev team hard with these issues and they actually respond.

I have to see people like you completely out of reality…

Please don't talk like you are the only one having problems! We acknowledge yours, so, why don't you do the same?

For instance, one of many issues that I've complained to the Xbox dev team like years ago, not 1, 2 but 7 years (since the launch of Xbox One) just been addressed! Yeah, it took that long. Do you really think, during that time, I didn't do what you just did? I did that and more. But it didn't work. Then, I got the chance to talk one-on-one with one of the engineers. I was able to convince them and got one of those issues fixed. I'm still in contact with them today. I give my feedback to them everytime.

So, all I'm asking you is be patient, try to connect with one of the engineers and use right words to convince them, instead of bad-mouthing them/us.

Adrenesis commented 3 years ago

Well, when an issue opens, and your answer is how you (should) adapt yourself to the issue, I'm doubtful you give more than the impression of minimizing a really really annoying issue and that you tell to @microsoft that this can be ignored, and again as I told, this is an impression.

BTW, to avoid yelling like you say, I waited 4 years to switch from 7 (a consistent OS, that became unconsistent because @microsoft dropped support before the official end, and should have become Libre and Open source, but became useless pieces of random codes) to 10 (an already broken OS, not even talking about the spyware side of the software).

I'm a libre video game dev, I don't like windows, but I know it well, and I have to use it to make sure our games work on this OS too, and I end up losing time to stupid half coded features that no one cares about and Steam Input does way way better.

Sorry, this is gonna sound like trolling but this is important, me yelling today, refreshed the issue and made you put the information public that you talked to engineers for years for an almost null result, again, I'm sorry, but to me going from this info looks a bit more like reality, than people adapating themselves around a broken piece of code without being aware of the bugginess of this behaviour.

I invite you to add this info to #1495 after my comment a little bit more centered on the issue itself, so it will looks even more like reality and maybe, the next time someone will type "disable Xinput Win10 interface" they will maybe face an issue that looks like reality.

When this issue triggers windows 10 menus become unusable, if you try to see your settings, it take inputs from an unplugged controller to randomly edit them, even restarting the computer correctly requires workarounds, this is the reality, and this is unacceptable for a paid and closed soures OS.

shaheedmalik commented 3 years ago

@shaheedmalik and @Nirmal4G

We really don't care about what works for you and your dumb useless workaround, I'm a video game dev, I do stuff with controller, this is a working machine not a random input party.

You're the one mad that an unofficial controller doesn't work with the Windows OS. But you're a video game dev, so you want all other UWP apps, that also run on Xbox, to the disabled to suit you. That's like asking for the keyboard input to be disabled because your unlicensed keyboard doesn't work correctly.

This feature is NOT usable as INCOMPLETE, this anti-feature shouldn't be enabled by default, my OS behaviour should not changed without my consent, and egoist people like you have nothing to do on git repository sites, we are not trying to determine what's your stuff, we are trying to determine what should be an acceptable OS behaviour for everyone.

You want all other developers to not to able to to use gamepads as input to suit you. Disable it in settings.

This is not complicated, consent, now with me, CONSENT, consent is mandatory not optionnal, I didn't subscribe to Microsoft's beta, I shouldn't have beta feature coming in my way, when I'm WORKING.

This issue has been going for 2 years now, still there is no fix, I waited on 7 as much as I can but python dropped support I had to switch to 10, last week has been a workaround party because the OS is bad by design and people like you keeps denying the whole big issue with all that.

This is so frustrating, not only working on this computer is a mess, but also I have to see people like you completely out of reality talking about Steam Input and stuffs on the microsoft forum to deny the fact that Microsoft shouldn't slide their broken stuffs (to say the least) into the OS.

Nobody here is talking about Steam Input. It's all about UWP input in UWP applications. If you want Steam to work correctly, contact the company that develops Steam. A guy above complained about an API not working correctly instead of bringing the problem up to have it fixed.

Adrenesis commented 3 years ago

You're the one mad that an unofficial controller doesn't work with the Windows OS

Too bad, you are again wrong, and my controller is an official Xbox One controller. please talk to add infos to the issue, or just stop talking about it, now you look as skilled to reading than a Microsoft Agent from the MS forum (this is not a nice thing I tell you, I'll help you on this one).

That's like asking for the keyboard input to be disabled because your unlicensed keyboard doesn't work correctly.

This has nothing to do with hardware license, WTF, you should just read in fact, it just could help you understand.

Nobody here is talking about Steam Input. It's all about UWP input in UWP applications. If you want Steam to work correctly, contact the company that develops Steam. A guy above complained about an API not working correctly instead of bringing the problem up to have it fixed.

and there you go, gone in the same trap than Microsoft agents, if someone says "Steam" when talking about these anti-features from Microsoft, you just go out of bound. I'm not talking about steam, I'm talking about the facts that microsoft agents will tell you that Steam is the source of the issue, it's all over the net... but the issue itself IS:

WHY MY XBOX CONTROLLER CONTROLLER WINDOWS 10 UI WHEN I DON'T CARE ABOUT THIS FEATURE? WHY WINDOWS 10 IS STILL RECEIVING INPUTS FROM AN UNPLUGGED CONTROLLER THAT MAKES THE SETTINGS MENU UNUSABLE?

And now, tell me where and how I did wrong stuff to end up with this, and honestly, if you tell me that "this is not your problem because it works fine for you", it's definitive, you don't understand the goal of issues itself, and please stop cluttering that space!

Instead go to https://github.com/Prouk/NoProblemo, it's a space for people like you, those who want others to know they can perfectly live with the issue when we don't care about it and we just want to (for example) BE ABLE TO DISABLE THE FEATURE

PS: downvoting a post that talks about consent is pretty sick too

shaheedmalik commented 3 years ago

You're the one mad that an unofficial controller doesn't work with the Windows OS

Too bad, you are again wrong, and my controller is an official Xbox One controller. please talk to add infos to the issue, or just stop talking about it, now you look as skilled to reading than a Microsoft Agent from the MS forum (this is not a nice thing I tell you, I'll help you on this one).

That's like asking for the keyboard input to be disabled because your unlicensed keyboard doesn't work correctly.

This has nothing to do with hardware license, WTF, you should just read in fact, it just could help you understand.

Nobody here is talking about Steam Input. It's all about UWP input in UWP applications. If you want Steam to work correctly, contact the company that develops Steam. A guy above complained about an API not working correctly instead of bringing the problem up to have it fixed.

and there you go, gone in the same trap than Microsoft agents, if someone says "Steam" when talking about these anti-features from Microsoft, you just go out of bound. I'm not talking about steam, I'm talking about the facts that microsoft agents will tell you that Steam is the source of the issue, it's all over the net... but the issue itself IS:

WHY MY XBOX CONTROLLER CONTROLLER WINDOWS 10 UI WHEN I DON'T CARE ABOUT THIS FEATURE? WHY WINDOWS 10 IS STILL RECEIVING INPUTS FROM AN UNPLUGGED CONTROLLER THAT MAKES THE SETTINGS MENU UNUSABLE?

And now, tell me where and how I did wrong stuff to end up with this, and honestly, if you tell me that "this is not your problem because it works fine for you", it's definitive, you don't understand the goal of issues itself, and please stop cluttering that space!

Instead go to https://github.com/Prouk/NoProblemo, it's a space for people like you, those who want others to know they can perfectly live with the issue when we don't care about it and we just want to (for example) BE ABLE TO DISABLE THE FEATURE

PS: downvoting a post that talks about consent is pretty sick too

You're the one mad that an unofficial controller doesn't work with the Windows OS

Too bad, you are again wrong, and my controller is an official Xbox One controller. please talk to add infos to the issue, or just stop talking about it, now you look as skilled to reading than a Microsoft Agent from the MS forum (this is not a nice thing I tell you, I'll help you on this one).

That's like asking for the keyboard input to be disabled because your unlicensed keyboard doesn't work correctly.

This has nothing to do with hardware license, WTF, you should just read in fact, it just could help you understand.

Nobody here is talking about Steam Input. It's all about UWP input in UWP applications. If you want Steam to work correctly, contact the company that develops Steam. A guy above complained about an API not working correctly instead of bringing the problem up to have it fixed.

and there you go, gone in the same trap than Microsoft agents, if someone says "Steam" when talking about these anti-features from Microsoft, you just go out of bound. I'm not talking about steam, I'm talking about the facts that microsoft agents will tell you that Steam is the source of the issue, it's all over the net... but the issue itself IS:

WHY MY XBOX CONTROLLER CONTROLLER WINDOWS 10 UI WHEN I DON'T CARE ABOUT THIS FEATURE? WHY WINDOWS 10 IS STILL RECEIVING INPUTS FROM AN UNPLUGGED CONTROLLER THAT MAKES THE SETTINGS MENU UNUSABLE?

And now, tell me where and how I did wrong stuff to end up with this, and honestly, if you tell me that "this is not your problem because it works fine for you", it's definitive, you don't understand the goal of issues itself, and please stop cluttering that space!

Instead go to https://github.com/Prouk/NoProblemo, it's a space for people like you, those who want others to know they can perfectly live with the issue when we don't care about it and we just want to (for example) BE ABLE TO DISABLE THE FEATURE

PS: downvoting a post that talks about consent is pretty sick too

You're asking for an input feature that other developers use to be disabled because it annoys you. Instead of asking for the problem to be fixed in the Windows shell by the Shell team, you're asking for an API to be disabled to suit you.

New flash: Nobody here works on the Shell team.

Adrenesis commented 3 years ago

News Flash: nobody is supposed to know that Windows' menus and settings are not UWP apps (if that's even true, because it shares the same shadow input event glitch)

james28909 commented 2 years ago

lol what? if i have a controller, it doesnt matter where tf it came from. my controller input should not be able to be hijacked by any process that i do not give explicit permission to. it is my system, i bought and paid for it and use it for gaming,

there should be a simple toggle in bluetooth devices or controller configuration that allows you to disable uwp input from controller system wide. if developers want to allow users to use controllers in uwp apps, thats fine and dandy, but dont force people who couldnt care any less about it to use that retarded ass feature. its simple, just fix it because ms has an audience that is more than just uwp app users. i would go out on a limb and say that the majority of users dont even use uwp apps enough to have this function forced anyway.

just GD add a toggle so we can turn it off (if you have a v1 ds4 then use the reg fix i posted, i would say maybe it might work for other controllers if you just add the device id to the reg key.

those who are saying that we should just eat shit, can in fact eat shit themselves because this is ont a feature that should be forced on controller users. MS can fuck right off on this one

realhet commented 2 years ago

Sadly the registry fix doesn't work for my device (PowerA wired controller, listed as generic XInput HID). I tried 3 more places in the registry where I've found the "GameInput" key. Triple checked the VIP PID numbers, reseted, unplugged, replugged into different USB connector. -> No luck.

So if I want to use my advanced xbox remote controller mapping to control my pc (the whole thing, not just 4 directions and 2 buttons ;), the best I can do for now is to avoid UWP Apps. For Start Menu and explorer.exe, I can use Open Shell. For other Apps, like the Mail app it is easy to find a web alternative and use that from a non-UWP browser.

Seems like this one is a classic "if the mountain won't come to Muhammad" situation we got here. All about a single boolean bit of information.

mkern3 commented 1 year ago

I have been disappointed by this issue for years. I tried various fixes (old drivers helped somewhat, but only until next Windows 10 update, and only when the controller is connected with the USB cable), but no real solution - that is really up to Microsoft who designed the driver (but - as we all see - is reluctant to address their design issue).

Recently, I have found a workaround for my use case (which may not be typical, by the way). It is really not a solution. And I understand that other people may have different issues in different use cases. Yet, I decided to post my finding to help, or at least inspire, others.

The workaround is one-off only - for the current session. It does not require installations or regedits.

The key idea of the workaround is that, as it surfaced when I fiddled around, the XBox Controller events are not passed to all users of the machine, but only to the user who logged in last.

If you do not already have more user accounts on your Windows 10 machine, you will need to create a second account to use this workaround. (With local admin rights, this is an easy exercise.)

Then you can just play around to resolve your particular issue. The ways to log-in another user may include:

(Please note that, for instance, an RDP re-connection to an already open session, is not a login.)

Just remember, only the user who logged in last gets the XBox Controller events. So, what you want to achieve is to direct those bloody keyboard-like events for UWP applications to where they don't hurt...

rinzwind5 commented 9 months ago

Why on earth does a plugged in xbox controller control UWP apps (and ONLY UWP apps). It moves the selection in start menu, settings, etc. and intervenes with own tooling. Why is there not even a setting to disable this? It does not even work in all software, just UWP framework crap. Multiple topics can be found over the internet with zero solutions.

fultonm commented 3 months ago

This is crap. This controller hijacking feature needs to be ripped out or fully implemented. If you pick the latter, still disable it until it's done. Windows needs to implement controller-to-mouse input as well, and allow the user to configure it. Only then can we rely on the operating system to manage controller input on the desktop. Until then, we need apps like Gopher , Steam, or xpadder, and we need Windows to not interfere or compete with that solution.

For those still searching for a solution, the accepted answer here about a registry edit https://superuser.com/questions/1540608/disable-xbox-360-controller-in-uwp-apps-like-windows-store-and-start-menu finally solved it.

koitsu commented 2 months ago

For those still searching for a solution, the accepted answer here about a registry edit https://superuser.com/questions/1540608/disable-xbox-360-controller-in-uwp-apps-like-windows-store-and-start-menu finally solved it.

Are you sure this still works? See my comment in https://github.com/microsoft/microsoft-ui-xaml/issues/1495#issuecomment-2236116284 as it looks like they may have broken it in newer Win10Pro 22H2 builds.

fultonm commented 2 months ago

It still works for me on latest Windows 11

demolen commented 1 week ago

It doesn't work in Version 10.0.22621 Build 22621