Global Keyboard handling
Posted: 04 Apr 2019, 16:21
Hi,
How can I handle keyboard events globally, without needed a specific element to be focused?
My root element is currently a Page, and it contains a Grid; both have a Background defined. However I cannot seem to receive the KeyDown/KeyUp events on those (either when using a KeyUp definition in the xaml + wiring in ConnectEvent or wiring directly in the code behing using, eg, control.KeyUp += OnKeyUp).
Any idea what I'm missing? Thanks!
How can I handle keyboard events globally, without needed a specific element to be focused?
My root element is currently a Page, and it contains a Grid; both have a Background defined. However I cannot seem to receive the KeyDown/KeyUp events on those (either when using a KeyUp definition in the xaml + wiring in ConnectEvent or wiring directly in the code behing using, eg, control.KeyUp += OnKeyUp).
Any idea what I'm missing? Thanks!