XboxGameBarHotkeyWatcher

This object allows you to register and then monitor hotkey presses by the user. Use this API if you want to provide the user hotkey shortcuts to perform actions within you widget; whether your widget is visible or not.

Factory

XboxGameBarHotkeyWatcher CreateWatcher(XboxGameBarWidget widget, IVectorView<VirtualKey> keys)

You pass your XboxGameBarWidget object to provide correct context to your control object.
Also, provide a vector of virtual keys that make up the hotkey combo. If you want to register multiple hotkey combinations, create multiple watcher objects.

Properties

None

Methods

void Start()

Starts the watcher running.

void Stop()

Stops the watcher.

Events

event Windows.Foundation.TypedEventHandler<XboxGameBarHotkeyWatcher, HotkeySetStateChangedArgs> HotkeySetStateChanged

Event raised when the hotkey combination is pressed by the user. HotkeySetStateChangedArgs contains a bool specifying whether the hotkey set is currently down (pressed) or not.