Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
In an Electron app, can you combine `Command` with `MediaNextTrack` as a global shortcut?

I'm trying to add a Cmd+MediaNextTrack shortcut to this app I'm building.

Combined shortcuts (like e.g. Cmd+Shift+Space) seem to work fine in my Electron app.

I am aware of the Security & Privacy / Accessibility setting that needs to be enabled for MediaNextTrack to be accessible. It's enabled locally; the following code works:

    let successfullyRegistered = globalShortcut.register('MediaNextTrack', async () => {
        console.log("==> activated.")
    });

and it actually takes over any "next track" action from Spotify and correctly logs to console.

Also the successfullyRegistered boolean returns as true.

However if I change that code to:

    let successfullyRegistered = globalShortcut.register('Cmd+MediaNextTrack', async () => {
        console.log("==> activated.")
    });

The console is no longer activated.

But successfullyRegistered is true.

And globalShortcut.isRegistered("Cmd+MediaNextTrack") returns true as well.

Various variations of Cmd don't work either: Command+MediaNextTrack, CommandOrControl+MediaNextTrack don't work either.


Question

Is there another way to activate that command + next track shortcut in the app?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!