I'm trying to capture any KeyDown
event regardless of what item has the focus. I have the following code in my constructor:
Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown;
And my function here:
void CoreWindow_KeyDown(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.KeyEventArgs args)
{
//Stuff in here
}
This works fine for regular keys, (arrows, letters) but does not receive events for special keys (like Enter or Tab).
How do I intercept the event for the Enter or Tab keypress and keep the system from handling it? I need to get the event all the time, regardless of what object has the focus.