I\'m trying to create a very simple WPF application. I\'d like to have an command handler called when the user presses \"H\" (not Control-H or Alt-H, just H). If I use the
Don't use the KeyGesture type or property (as one key is not a gesture).
KeyGesture
e.g.
KeyBinding b = new KeyBinding() { Command = MyRoutedCommand, Key = Key.H }; InputBindings.Add(b);
Same for XAML
<KeyBinding Command="{Binding MyRoutedCommand}" Key="H" />