The research, the problems, the mid-age crisis
There are some questions here and there about capturing the play/pause events. The solution usually relies on extending NSApplication and capturing the sendEvent. However, there are two problems with that: The iTunes opens OR some apps capture it before (Spotify I am looking at you).
Damn you spotify
More people were bored with iTunes opening using the play/pause, and posted in the stackoverflow. However, the solution still gets beaten by spotify (and it relies on a strange whitelist). If I open the example and press one of the mediakeys spotify catches the event and that solution doesn't.
How can I defeat Spotify and capture media events?