title: Access to "media keys" from within a browser tab
body: <p>Is there a way to access the "media keys" with Javascript from within a browser tab/window?</p>
  
  <p>I am mainly interested in a google chrome solution.</p>
  
  <p>Using the following code, there doesn't seem to be an event generated for the media keys:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body onKeyDown="showKeyCode(event)"&gt;
      &lt;script type="text/javascript"&gt;
  
          function showKeyCode(event) {
              alert(event.keyCode);
          }
  
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Am I missing something?  Could I do better with a Google Chrome extension??</p>
  
  <p><strong>Update:</strong>  to address this problem I crafted the following tools:</p>
  
  <ul>
  <li>Chrome <a href="https://github.com/jldupont/ChromeMusicMan" rel="noreferrer">MusicMan</a></li>
  <li><a href="https://github.com/jldupont/MediaKeysServer" rel="noreferrer">Mediakeys Server</a></li>
  </ul>