title: GetKeyState function?
body: <p>Why after I press the directional arrow ON, the function GetKeyState continues to give me a value greater than 0?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  using namespace std;
  
  int main()
  {
      for(int i = 0; i &lt; 1000; ++i)
      {
          if(GetKeyState(VK_UP))
          {
              cout &lt;&lt; "UP pressed" &lt;&lt; endl;
          }
          else
              cout &lt;&lt; "UP not pressed" &lt;&lt; endl;
  
          Sleep(150);
      }
  
      return 0;
  }
  </code></pre>