UIElement Keyboard Events
UIElement exposes two simple routed events for keyboard input: KeyDown and KeyUp. The EventArgs parameter passed to keyboard event handlers is a KeyRoutedEventArgs instance that contains the following properties:
→ Key—The key that was pressed or released. This property is of type Windows.System.VirtualKey, a large enumeration of every possible key.
→ KeyStatus—Reports extended information for certain keys.
→ Handled—The typical routed event property that can “halt” bubbling.
Although an app might be used with a software keyboard or hardware keyboard, the resulting input looks identical.
The KeyStatus property is a Windows.UI.Core.CorePhysicalKeyStatus structure. In case you didn’t get all the hints from its name, this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access