Global Keyboard Hooks (C#)

Luke picture Luke · May 5, 2009 · Viewed 22.9k times · Source

Possible Duplicate:
Global keyboard capture in C# application

Can anyone help me setup a global keyboard hook for my application?

I want to set hotkeys (such as Ctrl+S) that can be used when not focused on the actual form.

Answer

Tim Robinson picture Tim Robinson · May 5, 2009

Paul's post links to two answers, one telling you how to implement a hook, and another telling you to call RegisterHotKey. You shouldn't need to install a hook for something as simple as a Ctrl+S hotkey, so call RegisterHotKey instead.