Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global next/previous track shortcuts #1604

Open
MoonlitMonitor opened this issue May 11, 2024 · 4 comments
Open

Global next/previous track shortcuts #1604

MoonlitMonitor opened this issue May 11, 2024 · 4 comments
Labels
feature request This is a request for the addition of some feature.

Comments

@MoonlitMonitor
Copy link

One of my extra mouse buttons is mapped to play/pause. Whether or not I have Nuclear in focus, that mouse button can be used to play/pause in Nuclear, unless I have other sources playing in other programs.

However, two of the other extra mouse buttons are mapped to 'next track' and 'previous track', but I can only use these on Nuclear when the application is in focus.

It would be helpful if I could go to the next/previous track without having Nuclear in focus.

OS: Windows 11

@MoonlitMonitor MoonlitMonitor added the feature request This is a request for the addition of some feature. label May 11, 2024
@nukeop
Copy link
Owner

nukeop commented May 11, 2024

There's a method to do this but there's a caveat to making it multiplatform: https://www.electronjs.org/docs/latest/api/global-shortcut#globalshortcutregisteraccelerator-callback

The following accelerators will not be registered successfully on macOS 10.14 Mojave unless the app has been authorized as a trusted accessibility client:

"Media Play/Pause"
"Media Next Track"
"Media Previous Track"
"Media Stop"

@MoonlitMonitor
Copy link
Author

There's a method to do this but there's a caveat to making it multiplatform: https://www.electronjs.org/docs/latest/api/global-shortcut#globalshortcutregisteraccelerator-callback

The following accelerators will not be registered successfully on macOS 10.14 Mojave unless the app has been authorized as a trusted accessibility client:

"Media Play/Pause"
"Media Next Track"
"Media Previous Track"
"Media Stop"

If I understood correctly, this doesn't seem to be a problem on Windows or Linux, but on macOS users would have to authorize the application by allowing it to use special permissions? If so, is that a security concern that would stop you from adding this feature?

@nukeop
Copy link
Owner

nukeop commented May 15, 2024

There are no security concerns here. If anyone wants to contribute this feature I'll be glad to merge it.

@Packjackisback
Copy link

Linux playerctl also lacks the ability to skip songs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This is a request for the addition of some feature.
Projects
None yet
Development

No branches or pull requests

3 participants