- dcockerham
- Posts: 11
- Joined:
Is it possible to disable default gamepad button handling?
We're trying to implement a menu where the gamepad's shoulder buttons, which are mapped to PageLeft and PageRight, are used to change a display in the background. However, the default logic for PageLeft/PageRight moves the target of the Focus. We do NOT want the Focus to be overridden when we press these buttons, and this is causing us some problems. Is there a way to disable this automatic portion of these button inputs so that the only actions triggered by the button presses are the triggers that we define for it?
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Is it possible to disable default gamepad button handling?
KeyboardNavigation manages the focus when no one else handles the KeyDown event, so you can add a behavior to the menu that sets the e.handled to true for the PreviewKeyDown event when PageLeft and PageRight keys are pressed, could you try that?
- dcockerham
- Posts: 11
- Joined:
Re: Is it possible to disable default gamepad button handling?
Ah, looks like that'll do the trick! I was attempting to implement that before and it didn't seem to be working for me so I thought it just wouldn't work for this, but giving it another go now, it seems that I'd just made a mistake in my implementation. Thank you for your time!
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Is it possible to disable default gamepad button handling?
Great to know it worked, marking this as solved then.
Who is online
Users browsing this forum: Google [Bot] and 62 guests