title: Using Hot Keys with Monaco Editor?
body: <p>I'm trying to use hot keys in a monaco editor to run a function when <strong>cmd + enter</strong> is pressed using the 'react-hotkeys-hook' npm package.</p>
  <p>I have it working when I click off from the monaco editor. It seems when the cursor is focused in the editor, the hot keys don't work.</p>
  <p>Is there a way to make the hot keys work while also typing in the monaco editor instead of manually clicking off to anther div?</p>
  <p>Here is some of the code I'm working on:</p>
  <pre><code>import React from &quot;react&quot;;
  import Editor from &quot;@monaco-editor/react&quot;;
  import { useHotkeys } from &quot;react-hotkeys-hook&quot;;
  
  export default function codeEditor(props) {
  useHotkeys(&quot;cmd+enter&quot;, () =&gt; runCode());
  
  function runCode() {
    alert('Running code...')
  }
  
  return (
      &lt;div className=&quot;editor-container&quot;&gt;
        &lt;Editor
          defaultValue={`Hello World`}
          onMount={handleEditorDidMount}
          width=&quot;100%&quot;
          height=&quot;80vh&quot;
          theme=&quot;vs-dark&quot;
          fontSize='20px'
          defaultLanguage=&quot;javascript&quot;
          options={{
            fontSize: '18px'
          }}  
        /&gt;
      &lt;/div&gt;
    )
  }
  </code></pre>