title: Capturing "control" keydown press event in JavaScript
body: <p>I'm trying to figure out when the user presses the <kbd>control</kbd> key in an HTML page using JavaScript.</p>
  <p>In the following code &quot;CTRL UP&quot; will appear as expected, but &quot;CTRL DOWN&quot; will only appear if I <em>also</em> press another key, e.g. <kbd>shift</kbd>.</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
  window.addEventListener(&quot;keyup&quot;, function(event) {
    // Bind to both command (for Mac) and control (for Win/Linux)
    if (event.ctrlKey) {
      console.log(&quot;CTRL UP&quot;);
    }
  }, false);
  
  window.addEventListener(&quot;keydown&quot;, function(event) {
    // Bind to both command (for Mac) and control (for Win/Linux)
    if (event.ctrlKey) {
      console.log(&quot;CTRL DOWN&quot;);
    }
  }, false);
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Ctrl Demo
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Is there any way to get the &quot;CTRL DOWN&quot; key event to work as expected, when <kbd>ctrl</kbd> is pressed and held down by itself?</p>
  <p>NOTE: I'm trying to get this to work in a Google Chrome extension, so using Chrome specific APIs or tricks to make this work is completely fine. I'm using Google Chrome 15.0.874.83 beta on Ubuntu.</p>