How do you get the character appropriate for the given KeyDown event in WPF?
相关问题
- VNC control for WPF application
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- How to convert a string to a byte array which is c
- How can I add a horizontal line (“goal line”) for
Try this:
Import function MapVirtualKey
Not all KeyDown events correspond to a single, visible character -- for instance, Backspace and Enter. You will have to compare the event arg's contents with what you want to associate. For example, on my US QUERTY keyboard, the key at the top left is a back-tick, but it might look like something else to another keyboard.