The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP][XBOX] Disabling Xbox Accelerator Support RRS feed

  • Question

  • Hey Guys,

    I have a list view where I would like to have a custom action for left/right triggers when holding the triggers above an item in the listview. I can handle this no problem by listening to CoreWindow_KeyUp/KeyDown events. The problem I am running into is that when I hold the triggers, it will scroll me up/down, which I do not want. I found out it is due to action accelerators described here: https://msdn.microsoft.com/en-us/windows/uwp/input-and-devices/designing-for-tv#hardware-buttons

    Is there any way to disable these? I have tried setting the args.Handled property to true, which normally works, but doesn't in this case. Any suggestions?

    Thanks,

    Andrew

    Friday, December 16, 2016 4:42 AM

Answers

  • You just need to get to the KeyDown event before the ListView handles it. Try overriding ListView.OnKeyDown and do your logic before calling base.OnKeyDown(e). Alternately, you can listen to KeyDown on the ListViewItems.

    Wednesday, December 21, 2016 7:14 PM

All replies

  • Hi Spartain,

    Since I don't have a Xbox device at this moment, I have involved someone familiar with this topic to look at this issue. There might be some time delay. Appreciate your patience.

    Best Regards,
    David


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 20, 2016 3:34 AM
  • You just need to get to the KeyDown event before the ListView handles it. Try overriding ListView.OnKeyDown and do your logic before calling base.OnKeyDown(e). Alternately, you can listen to KeyDown on the ListViewItems.

    Wednesday, December 21, 2016 7:14 PM
  • Sounds good! I will give it a shot when I get home. If you don't hear anything back assume it works!

    Thanks,

    Andrew

    Wednesday, December 21, 2016 8:17 PM