I’m working on an app for Windows 8.
I’m trying to determine if a key pressed is alphanumeric. The KeyRoutedEventArgs class doesn’t seem to provide any helpers.
Is there something I’m overlooking? What is the best way to determine if the user entered a letter or number?
The
KeyRoutedEventArgscontains aKeyvalue which is a VirtualKey.You can simply test if the
Keyis within the codes you want to support from this list.For example: