Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Intercepting KeyDown event
posted

Hi

I have a number of KeyDown event handlers, each for a certain key combo that is of interest. Among those are events for CTRL+S and CTRL+N for save and new action respectively.

These two events do not seem to be firing, and on CTRL+S nothing seems to happen, while on CTRL+N new IE window opens. Is there any way of intercepting these events and canceling out stuff like opening new window?

Thanks

For both events I do a check for

Keyboard.Modifiers == ModifierKeys.Control && e.Key == Key.N (or Key.S)