title: How to poll a keyboard key in C?
body: <p>I am looking for some sort of alternative to kbhit() for Mac, that will allow me to poll the state of a specific keyboard key. My only requirement is that it not be blocking, or require me to hit the enter key. I saw some similar posts on this site, but they all seemed to be blocking.</p>
  
  <p>I really just want to be able to run a loop and check whether a specific key is pressed or unpressed during each loop, without slowing down or blocking the rest of my loop.</p>