title: react hook how to detect key combination cmd+enter
body: <p>I want to run a function when detect key combination cmd+enter within a text-area.</p>
  <p>And it need to be compatible with react hook.</p>
  <p>I need some suggestion on how to do this.</p>
  <pre class="lang-js prettyprint-override"><code>useEffect(() =&gt; {
          const listener = (event) =&gt; {
              console.log('a', event.which)
              if (event.which === 13 &amp;&amp; event.which === 91) {
                  console.log('Enter key was pressed. Run your function.')
                  event.preventDefault()
                  // callMyFunction();
              }
          }
          document.addEventListener('keydown', listener)
          return () =&gt; {
              document.removeEventListener('keydown', listener)
          }
      }, [])
  </code></pre>
  <p>This is my code, it doesn't regconize the combination.</p>