Re: Take over function keys
Re: Take over function keys
- Subject: Re: Take over function keys
- From: "I. Savant" <email@hidden>
- Date: Mon, 18 May 2009 17:12:14 -0400
On Mon, May 18, 2009 at 3:54 PM, Kevin Gessner <email@hidden> wrote:
> Look into creating a CGEventTap -
> http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html.
> You'll want your callback to look for F-key events, and return NULL to "eat"
> the event.
Nah ... if he only wants to listen for the function keys when the
app is active, creating an NSApplication subclass and overriding
-sendEvent: is sufficient. If the key code / flags is what you want,
dispatch the message however you wish, otherwise call super.
It depends, though, what behavior you're looking for. In the case of
laptops, the function keys control media playback, volume, display and
keyboard brightness, and a number of other things. Consider that when
dealing with function keys.
--
I.S.
_______________________________________________
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