title: macOS – In an Electron app, can you combine `Command` with `MediaNextTrack` as a global shortcut?
body: <p>I'm trying to add a <code>Cmd+MediaNextTrack</code> shortcut to this app I'm building.</p>
  <p>Combined shortcuts (like e.g. <code>Cmd+Shift+Space</code>) seem to work fine in my Electron app.</p>
  <p>I am aware of the Security &amp; Privacy / Accessibility setting that needs to be enabled for <code>MediaNextTrack</code> to be accessible. It's enabled locally; the following code works:</p>
  <pre><code>    let successfullyRegistered = globalShortcut.register('MediaNextTrack', async () =&gt; {
          console.log(&quot;==&gt; activated.&quot;)
      });
  </code></pre>
  <p>and it actually takes over any &quot;next track&quot; action from Spotify and correctly logs to console.</p>
  <p>Also the <code>successfullyRegistered</code> boolean returns as <code>true</code>.</p>
  <p><strong>However if I change that code to:</strong></p>
  <pre><code>    let successfullyRegistered = globalShortcut.register('Cmd+MediaNextTrack', async () =&gt; {
          console.log(&quot;==&gt; activated.&quot;)
      });
  </code></pre>
  <p>The console is no longer activated.</p>
  <p>But <code>successfullyRegistered</code> is <code>true</code>.</p>
  <p>And <code>globalShortcut.isRegistered(&quot;Cmd+MediaNextTrack&quot;)</code> returns <code>true</code> as well.</p>
  <p>Various variations of Cmd don't work either: <code>Command+MediaNextTrack</code>, <code>CommandOrControl+MediaNextTrack</code> don't work either.</p>
  <hr />
  <p><strong>Question</strong></p>
  <p>Is there another way to activate that command + next track shortcut in the app?</p>