title: How to capture ALT+N on keypress in JavaScript
body: <p>I have some simple code which logs the pressed key code, like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.addEventListener('keypress', function(e) {
    console.log(e.keyCode);
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>It seems to work for <kbd>Alt</kbd> + pretty much every other on my keyboard. <em>Except for <kbd>Alt</kbd> + <kbd>N</kbd>.</em>
  It seems to not be registering the event at all! Just <kbd>N</kbd> (without the <kbd>Alt</kbd>) seems to work, and so do other combinations like <kbd>Ctrl</kbd> + <kbd>N</kbd>. When I type <kbd>Alt</kbd> + <kbd>N</kbd> nothing else happens, so it's not been reserved by the system as far as I know. I am using Chrome on a Mac.</p>
  
  <p>Is this just something wrong with my computer or does it happen for others too? If it does happen for others, why does it do this and are there ways to detect it?</p>