Force keydown event to fire only once per keyCode
<p><strong>Situation</strong>: I have a <code>keydown</code> handler with a <code>switch</code> for what key is pressed, fairly standard stuff, but when any key is held down the <code>keydown</code> event fires repeatedly (rather than just once when the key is actually pressed).</p>

<p><strong>Why it's a problem</strong>: I want to keep the <code>keydown</code> listener active, i.e. be able to detect more than one key being pressed at once, but only have the event fire once per <code>keydown</code>. I will want to do something on the <code>keyup</code> for that <code>keyCode</code> based on the time between down and up, but that timing is getting screwed up because of the multiple firings.</p>

<p><strong>What I've tried</strong>: I am currently keeping a list of <code>keyCodes</code> that are down, and checking against those in my <code>keydown</code> handler to keep the default behaviour from happening if the <code>keyCode</code> is in my list. However, the event is still firing very often and I'm concerned about the efficiency/elegance of this solution.</p>

<p><strong>The actual question</strong>: Is there a good way to limit firing of the <code>keydown</code> event to <em>just</em> when the key is physically pushed down, or to only listen for specific keyCodes?</p>
