On May 17, 2009, at 4:40 PM, Brad Shappell wrote:

Hi,
I have an basic Cocoa app in which I'd like to take over the function keys (F1-F12) whenever when my app is active. For example, if my app is active when F1 is pressed I'd like to detect, then "eat" that event so that it is
not processed by the system.

Any pointers would be much appreciated,
Brad S.

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.

HTH.

-- Kevin

Kevin Gessner
http://kevingessner.com
ke...@kevingessner.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to