Emptying keyboard buffer in javascript
<p>If I have an element that responses on </p>

<pre><code>$('#div').keydown(function(event) { ....
</code></pre>

<p>and if user presses a key like a crazy rabbit on heat thousand times within a really short period, browser responses on most of those calls. </p>

<p>Can I somehow prevent that by flushing keyboard buffer?</p>
