title: Using GetKeyState()
body: <p>I would like to have a boolean event toggle when a key is pressed. Specifically, the 's' key. I have been pointed to the function GetKeyState(), which supposedly works under the Win32 API. I understand the ASCII code for the letter 's' is 115, and so my code is as follows:</p>
  
  <pre><code>if (GetKeyState(115) == 1)
  {
  &lt;EVENT&gt;
  }
  </code></pre>
  
  <p>However, this does not work. Why? Here is the MSDN reference: <a href="http://msdn.microsoft.com/en-us/library/ms646301%28v=vs.85%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms646301%28v=vs.85%29.aspx</a> ... "If the low-order bit is 1, the key is toggled"</p>