I have a button on a XAML form that calls the btnName_Click()
code in the backing cs
file.
I also want to assign a keyboard shortcut to run that same code. Basically CTRL<- or something similar.
This needs to work regardless of the control I'm currently in (there's a TextBox for example that I want to ensure doesn't capture the event if I'm in there).
I've read up on routed commands but that seems like a lot of work for something which should be simple.
Is there an easy way to do this or do I need to create routed commands? If I do need to use them, what's the simplest way to achieve what I want?