Search code examples
cocoakeyboardkeyitunesmedia

Cocoa app respond to keyboard play/pause key without launching iTunes?


I read this article and successfully make my app respond to media key: Make my Cocoa app respond to the keyboard play/pause key?

However, when I pressed play/pause key, the iTunes started to launch, is there any method to prevent iTunes launching when I press play/pause key in my app?


Solution

  • Your best bet is to use this SPMediaKeyTap code, it works OK, but it can be flaky since your app's bundle ID isn't included in other's code, and the developer is not responsive to requests for new bundle IDs.

    SPMediaKeyTap