Keyboard Shortcuts?

Topics: Getting Started
Apr 20, 2012 at 4:22 PM

Hey, I've got a view with a ContextMenu and I've got a MenuItem in it with the Header="Copy" and the InputGestureText="Ctrl+C". Obviously if the user clicks on the MenuItem, the ViewModel's Copy() funtion is called. What's the best strategy for detecting the keyboard input and routing it through to the Copy function in the VM?

Feb 12, 2013 at 12:07 PM
Hi - Did you manage to get this working?

I took am looking at provider keyboard shortcuts / global keyboard inputs for Silverlight and Caliburn.Micro. For example, for a specific View I might need to have the "ENTER" key result in a save, or the "ESC" key result in a Cancel/TryClose.

There are one or two links I could find, but they are old and incomplete and I'm not sure how to make them work.

If anyone has information on a working solution that is compatible with the current CM version, it would really help.