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

戏子无情 提交于 2019-12-23 15:39:14

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/7473000/cocoa-app-respond-to-keyboard-play-pause-key-without-launching-itunes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!