lidel / google-music-hotkeys

Browser extension that adds keyboard control to Google / YouTube Music
https://github.com/lidel/google-music-hotkeys#install
Creative Commons Zero v1.0 Universal
32 stars 5 forks source link

Apple keyboard shortcuts? #8

Open damacus opened 6 years ago

damacus commented 6 years ago

Thanks for the quick reply on firefox addons.

The keyboard shortcuts "MediaNextTrack", "MediaPlayPause", "MediaPrevTrack" don't seem to work with Firefox. Insterad as Chrome isn't open they open iTunes.

lidel commented 6 years ago

I think MacOS is simply hijacking your media keys, in a fashion similar to what MS Windows 10 does with CTRL+SHIFT+0 (https://github.com/lidel/google-music-hotkeys/issues/3#issuecomment-352142246).

I don't own a Mac, but here are two apps to try:

  1. http://milgra.com/high-sierra-media-key-enabler.html
  2. https://bekirserifoglu.wordpress.com/2017/10/01/solutionworkaround-for-mac-os-high-sierra-unified-media-buttons-playpause-next-and-previous-track-problem/
  3. discussions with more resources

Let me know if you find a working solution, I would love to add it to README.

damacus commented 6 years ago

So t his is really interesting, that's the behaviour I want (and have with Chrome).

if Google play music (GPM) is open, pressing play doesn't open iTunes another music player. It simply detects that GPM is playing audio and controls that window. Maybe it's a Firefox thing?

https://bekirserifoglu.wordpress.com/2017/10/01/solutionworkaround-for-mac-os-high-sierra-unified-media-buttons-playpause-next-and-previous-track-problem/

lidel commented 6 years ago

Not sure if related, but Firefox does not support "global" shortcuts yet (Bug 1411795) which means its window needs to be focused for key press to be registered by this extension. Do you think this may be the case?

damacus commented 6 years ago

Almost?

I'm seeing that behaviour even if I'm currently in Firefox.

On Fri, 1 Jun 2018, 13:08 Marcin Rataj, notifications@github.com wrote:

Not sure if related, but Firefox does not support "global" shortcuts yet (Bug 1411795 https://bugzilla.mozilla.org/show_bug.cgi?id=1411795) which means its window needs to be focused for key press to be registered by this extension. Do you think this may be the case?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lidel/google-music-hotkeys/issues/8#issuecomment-393861094, or mute the thread https://github.com/notifications/unsubscribe-auth/AACfUtezX6Zkf6ZT4xDH-Z4sqU8RUwyaks5t4S62gaJpZM4UWR3i .

lidel commented 6 years ago

AFAIK there is an additional Mac-specific handling for media buttons and <audio> in Chrome that probably made it work for you there, but it is not present in Firefox.

If Firefox is in focus and media buttons are configured like this and it does not work, then it is probably OS or some other app hijacking your key presses.

lidel commented 6 years ago

FYI there is a related upstream bug at: