Possible Duplicate:
How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5?
I'd like to have multiple global hotkeys in my new app (to control the app from anywhere in windows), and all of the given sources/solutions I found on the web seem to provide with a sort of a limping solution (either solutions only for one g.hotkey, or solutions that while running create annoying mouse delays on the screen).
Does anyone here know of a resource that can help me achive this, that I can learn from? Anything?
Thanks ! :)
http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx
If you're not using .net 3.5.
I would handle this by using P/Invoke to call RegisterHotKey() for each hotkey, and then use NativeForm (assuming you are using WinForms) to be notified of the WM_HOTKEY message. This should keep most of your hotkey code in one place.
The nicest solution I've found is http://bloggablea.wordpress.com/2007/05/01/global-hotkeys-with-net/
Note how you can set different lambdas to different hotkeys