-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Media keys can't be bound with global-shortcut #5268
Comments
@Limero Linux keys are by default stolen by You can see our implementation here https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/pull/638/files and our final current code for this here |
Thank you for your reply! |
@Limero If you read the global shortcut documentation --> https://github.com/electron/electron/blob/master/docs/api/global-shortcut.md It says
Basically if any other program has claimed shortcuts you can't have them. This is intended behaviour and not a bug in electron 👍 |
I understand that, but there should be something Linux specific in Electron that overwrites binds by dbus, if this is something that affects all Linux users. That way, every application doesn't have to implement their own fix. If dbus later stops with this behavior, Electron can remove the fix and all applications dependent on it will continue to work. |
It would be nice to be able to work around this in Electron, but that's a bit outside globalShortcut's original design and we won't do it ourselves. However PRs to add it will be appreciated. And thank @MarshallOfSound for pasting your awesome solution! |
I'm unable to bind any of the media keys with global-shortcut (medianexttrack, mediaplaypause, mediaprevioustrack and mediastop). Other keys like 'CommandOrControl+X' works as they should. The same problem exists even if no other applications are open, so there shouldn't be another music app blocking it.
I have tested binding with the 'proof of concept' mentioned in #3941 with the same results, so my implementation is correct.
When you press the media keys without anything open on Gnome, this image is shown on the screen: http://i.imgur.com/9Giv4LS.jpg
Maybe showing that icon counts as a bind, making Electron think it's already in use?
The text was updated successfully, but these errors were encountered: