OEM keys depends on the keyboard, that's ok. What I'm trying to accomplish is what Visual Studio does for a few shortcuts.
To focus on Solution Explorer, my shortcut is CTRL+ç (I'm using a Brazilian keyboard).
So, I've created a KeyGesture
with Key.Oem1
and the shortcut works just fine, however WPF shows CTRL+Oem1 in the InputGestureText
. I want to show the actually character bound to Oem1 key.
var gesture = new KeyGesture(Key.Oem1, ModifierKeys.Control);
var text = gesture.GetDisplayStringForCulture(new CultureInfo("pt-BR"));
//'text' is CTRL+Oem1 and should be CTRL+ç
How can I get the actual character? I did find this but it uses WinForm Keys enum.