title: Detect Alt/Option + another key in textarea
body: <p>I want to detect when the Alt/Option key and any other key are both pressed down simultaneously in a textarea on Mac. For example, I want to check for Alt/Option + 'h':</p>
  <p><strong>HTML</strong></p>
  <pre><code>&lt;textarea onkeydown=&quot;myFunction(event);&quot;&gt;&lt;/textarea&gt;
  </code></pre>
  <p><strong>JavaScript</strong></p>
  <pre><code>function myFunction(e) {
      if (e.altKey &amp;&amp; e.key==&quot;h&quot;) {
          // Do something here
      }
  }
  </code></pre>
  <p>The function works if I use Control instead of Alt. How can I get this to work with Alt on Mac?</p>
  <p><a href="https://jsfiddle.net/hdt02kgq/" rel="nofollow noreferrer">JSFiddle</a></p>