Open kenmhaggerty opened 5 years ago
Same here :)
Sorry, things seem to have changed recently and I haven't had time to find a workaround. I did notice that Apple has lately released an API to properly handle the keys without launching iTunes, thus mostly eliminating the need for this patch. Is the app that you are using not handling media keys properly? If so, can you share which app this is?
I checked on my iMac with a Bluetooth keyboard and can confirm that the play button doesn't launch iTunes, but my MacBook Pro's touch bar will launch iTunes via the play button even from Finder.
Which media player are you using that doesn't respond to the key in the first place?
I'm a little confused? My understanding is that this patch simply stops iTunes from launching when the play button is pressed and iTunes is not open. I am not using a media player when this happens.
Oh, I see the confusion. In previous macOS versions, Apple would launch iTunes when you used the media keys even if you had a different media player (e.g. Nightingale) running. That was my intented use case for creating this patch.
In your case it sounds like you don't want iTunes to start in any scenario...?
Yes! Sometimes I accidentally tap the play button, and it shouldn't do anything if there's no media player launched. I think that should be the default macOS behavior... but in the absence of that I've been relying on this patch to do that!
Ah, OK. I was thinking of archiving this project now that macOS supports originally intended use case out of the box, but I will take another look hopefully soon and report back here.
Hi, I found the patch for the same reason as kenmhaggerty's. I have to add that I use Spotify and if I haven't done anything with Spotify for a while (while it is open somewhere in my spaces) and I press play to play the music on spotify, many times it launches iTunes. Even though Spotify is open! I don't know if the patch you created fixes this behavior but I'm interested if it does. Also, I would love to never launch iTunes with the play button, and if it's possible, to even choose what to launch with it (Spotify for example). If you know something that does that, I would be really interested too. In any case, thanks for your work :)
I am debating creating a simple replacement menu bar app that can monitor the media keys and either ignore them (so iTunes doesn't launch) or letting another app handle it. This would also eliminate the need for patching an OS released file like this project does. But, it would add another app that would have to run all the time. Would such an app be of interest?
For my use it would be perfect, just an icon in the top bar wouldn't bother me :)
OK, I will do some research and see if that can be a replacement app. No commitments though :)
Awesome thanks :)
I did notice that Apple has lately released an API to properly handle the keys without launching iTunes,
Are there any links for this new API? I've searched Apple's documentation, but couldn't find anything more recent than Snow Leopard. https://developer.apple.com/library/archive/technotes/tn2450/_index.html
MPRemoteCommandCenter is what I had in mind.
FYI, BeardedSpice is an option for ignoring media keys. I created a simple "strategy" script for it that can accomplish this. Given BeardedSpice's original use case, the interface isn't ideal (shows the title of the first tab), but it's a proof of concept. This is the strategy gist.
Yes, please, if you have time, create something, anything that'll prevent iTunes from launching when you press the play button, even when there's no other media player open. Of course when iTunes or other media players are open the keys should work. I'm holding off upgrading to Mojave because of this. Thanks a lot.
I have the exact same issue as petersg83 and hoped to find any solution here. Are there any news on this?
I also have the same issue as those above me.
Any update on this?
Not a perfect solution but recently discovered https://github.com/tombonez/noTunes.
There's also https://github.com/beardedspice/beardedspice
I will have to double-check if the patch is working on my 2012 MacBook Pro running Mojave, but on my 2018 MacBook Pro running Mojave, the Touch Bar's play button still launches iTunes even after going through the regular setup process w/o error. (Disable SIP → Run patch → Re-enable SIP)
Please let me know what info I can provide to help debug.