title: Javascript Checking Keyboard State
body: <p>I am working on making a simple Javascript game and need to be able to check if certain keys are being pressed.  I have tried binding to the <code>onkeydown</code> event, but the problem that I am having is twofold: first, it won't let me check to see if more than one key is being pressed at any time. And second, it pauses after holding the key down before it starts spamming the event.</p>
  <p>In my code, I could either have an event, or a function that checks every millisecond to see if the key is being pressed.  Seeing as this is a game, I would really have no problem with either.</p>