Dealing with the new Apple keyboard's media keys (stifle iTunes)
Dealing with the new Apple keyboard's media keys (stifle iTunes)
- Subject: Dealing with the new Apple keyboard's media keys (stifle iTunes)
- From: Peter Maurer <email@hidden>
- Date: Fri, 10 Aug 2007 12:49:34 +0200
This one goes to fellow Apple keyboard early adopters:
I have just tweaked my movie viewer application to properly respond
to the new Apple keyboard's media keys (play/pause, backward,
forward). Turns out these are sent as NSSystemDefined events
(subtype: 8), regardless of whether your application is in front.
(Nevertheless, I've decided to ignore them whenever [NSApp isActive]
returns NO.)
Trouble is: If iTunes is running, it always responds to those keys, too.
There must be away to suppress this, though, because iTunes doesn't
act up when QuickTime Player is in front. In this case, iTunes just
stops its playback in response to the first play/pause key event,
then remains quiet.
So my question is: Does anybody know if this is hard-wired in iTunes
(as in: "keep a low profile when QuickTime Player is active") -- or
is there a way to influence iTunes' behavior by sending some kind of
callback message?
I've checked for distributed notifications, but QuickTime Player
doesn't seem to send any of those in response to media key events.
Thanks,
Peter.
__
manytricks.com | petermaurer.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden