<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="https://stackoverflow.com/questions/48935/how-can-i-register-a-global-hot-key-to-say-ctrlshiftletter-using-wpf-and-ne">How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5?</a>  </p>
</blockquote>



<p>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).</p>

<p>Does anyone here know of a resource that can help me achive this, that I can learn from?
Anything?</p>

<p>Thanks !  :)</p>

[{'answer_id': 81335, 'author': 'arul', 'author_id': 15409, 'author_profile': 'https://Stackoverflow.com/users/15409', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx" rel="noreferrer">http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx</a></p>\n\n<p>If you\'re not using .net 3.5.</p>\n'}, {'answer_id': 193421, 'author': 'Andy', 'author_id': 3857, 'author_profile': 'https://Stackoverflow.com/users/3857', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 2611761, 'author': 'Ohad Schneider', 'author_id': 67824, 'author_profile': 'https://Stackoverflow.com/users/67824', 'pm_score': 5, 'selected': False, 'text': '<p>The nicest solution I\'ve found is <a href="http://bloggablea.wordpress.com/2007/05/01/global-hotkeys-with-net/" rel="noreferrer">http://bloggablea.wordpress.com/2007/05/01/global-hotkeys-with-net/</a></p>\n\n<pre><code>Hotkey hk = new Hotkey();\n\nhk.KeyCode = Keys.1;\nhk.Windows = true;\nhk.Pressed += delegate { Console.WriteLine("Windows+1 pressed!"); };\n\nhk.Register(myForm); \n</code></pre>\n\n<p>Note how you can set different lambdas to different hotkeys</p>\n'}]
['https://Stackoverflow.com/questions/81150', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']