Search code examples
c#keyhook

Low-level Keyhook


I would like to run a low-level keyhook on a seperate thread in C# to detect for certain hotkeys. How would I do this?


Solution

  • If you need this keyboard hook only to detect hot keys then you should not use a hook. Windows supports hot keys with the RegisterHotKey() API function. Check my code sample in this thread to see how to use it. There's a C# sample further down the page.