title: How can I detect if a key is pressed in the terminal?
body: <p>Specifically, I am creating a Python 3.4 program that runs entirely in the terminal. Is there a cross platform way to detect if a specific key is down? I can do it on Windows using the <code>win32</code> function <code>getAsyncKeyState()</code>, but don't have a way to test keys on OSX or Linux.</p>
  
  <p>I know about <code>getch()</code>, but that doesn't let me test for some keys (such as shift) and waits for key repetition.</p>