title: Detect double Ctrl keypress in JS
body: <p>I have a custom CMS and would like to add a "shortcuts menu" triggered by the pressing of the <kbd>Ctrl</kbd> key twice within, say, 300 milliseconds.
  I use prototype, so my starting point obviously is: </p>
  
  <pre><code>Event.observe(document, 'keypress', function(event)
    { if(event.keyCode == Event.KEY_XYZ) { show_shortcuts});
  </code></pre>
  
  <p>My approach at the moment would be populating a global variable with the current time in milliseconds, and checking on each keypress whether a keypress has happened less than 300 milliseconds ago. </p>
  
  <p>But maybe there is a more elegant solution? </p>