C# – Daemon in C# to listen for keypress


I'm looking to create a small C# application that will either run as a daemon or sit in the taskbar, and wait for a specific keypress. When the expected keypress is encountered, I'll perform some actions.

This is going to be used primarily for quick-posting of data to a web-service I'm writing. I've looked around the net for a while, but my search terms have been too vague, and I haven't come across any concrete examples or guides.


Mike Trpcic

Best Solution

I came across this on CodeProject. It'll capture keystrokes while it's not focused. CodeProject: A Simple C# Global Low Level Keyboard Hook