Detect Key Press on Windows Without Window Focus
<p>I've been searching online but all the top results on Google only lead me to Java. This is frustrating.</p>

<p>What I want to do is: make a program that listens to keyboard events, without being the active program. It has to work on at least windows 7, using C.</p>

<p>For example lets say I have myprogram.exe and other.exe. I want to be able to run both of them simultaneously, and have focus on other.exe, then press keys, and have myprogram.exe which runs on the side display which keys I pressed and log them.</p>

<p>If somebody has a link to a guide or information that explains what I should use to make this, that would be grand. If you can write up an explanation yourself that would be even better, but I don't mind going through documentations as long as they're relevant.</p>

<p>I've written games in C that listen to input from the active window, but I'm not sure how to poll events when the window isn't focused.</p>