Possible Duplicate:
How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5?
I want to create a shortcut for my WPF application.
The application should be invisible most of the time and when Ctrl+N is pressed application should appear. I tried to do this like that :
Mcommand m = new Mcommand();
KeyBinding b = new KeyBinding()
{
Command = m,
Modifiers = ModifierKeys.Control,
Key = Key.Q
};
m executes when an application is visible. But when application is invisible it doesn't works. Any idea ? Thank you.