I have custom control (Numeric TextBox- which allows only numeric keys). When i am pressing subtract key from NumPad, it’s working fine. But when i am pressing OemMinus key(key near to ‘0’[DPad key]), OnKeyDown event returns ‘unknown’ key.
I want to handle OemMinus Key.
Thanks
I guess that this key cannot be identified because it is platform specific. ie it only appears on Windows keyboards (as distinct from Mac keyboards). Silverlight is cross-platform.
You should be able to identify the key using the
KeyEventArgs.PlatformKeyCodeproperty, but note that this is platform specific.Perhaps you can check for
(e.Key == Key.Unknown && e.PlatformKeyCode == x)