title: How Do I Check When the Spacebar is Pressed
body: <p>Right now I am using</p>
  
  <pre><code>function press(){
  if (32 in keysDown) {
  
  }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>setInterval(press, 1)
  </code></pre>
  
  <p>It detects when the spacebar is down.  I want to know the easiest way to detect when its pressed.  I have tried looking for a solution myself but everywhere I've gone its been for jQuery.</p>