Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- Subject: Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- From: Ken Thomases <email@hidden>
- Date: Tue, 22 Jan 2013 23:05:14 -0600
On Jan 22, 2013, at 8:33 PM, Clay Heaton wrote:
> While that goes full screen and does prevent process switching, it still allows the iTunes function keys to pass through to the system (as well as the volume controls). Pressing F8 (play/pause) launches iTunes and causes music to play.
>
> I would like to intercept all key presses and only send the volume control keys through to the system.
> I'm at a loss - is there any way to intercept and disable the iTunes function keys?
Some research suggests the answer is "no".
The keys are routed to "rcd", the remote control daemon, very early in their processing. rcd is hard-coded to know about various Apple apps and to route the keys to them. Strangely, although it does actually have checks for the displays being captured, it only uses that for specific cases (like controlling Aperture and iPhoto) and routing of volume up and down keys.
Apparently, not even an event tap at the HID tap location sees the key events.
http://stackoverflow.com/questions/1053351/binding-to-media-keys-on-apple-keyboards-under-osx-10-5#answer-1055446
There are various horrible hacks floating around, like removing iTunes, patching iTunes, or patching rcd. There are also workarounds like launching iTunes and putting it on a page where "play" is not a meaningful action, like the store. Or launching QuickTime Player and leaving it idle, since rcd prefers a running app to a non-running one (among the ones it knows about).
I see that you previously tried PushSymbolicHotKeyMode() but it wasn't available in 64-bit. You might try an experiment with a 32-bit test program just to see if it works. That might be your only option.
Finally, you can open a Technical Support Incident with Apple Developer Technical Support. Explain what you're trying to do and why and ask if they have a mean to accomplish it.
Good luck,
Ken
_______________________________________________
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