Re: How to get key code from "SysDefined" Carbon Event
Re: How to get key code from "SysDefined" Carbon Event
- Subject: Re: How to get key code from "SysDefined" Carbon Event
- From: James Walker <email@hidden>
- Date: Tue, 18 Oct 2011 13:22:26 -0700
On 10/18/2011 1:00 PM, Jerry Krinock wrote:
I've registered a handler for global hot keys with the Carbon Event
Manager, using InstallEventHandler(). However, I'd like the user to
be able to specify *two* different global hot key functions. Thus,
in my callback/handler, I need the key code and modifier flags of the
event, to determine which function they want.
The only documented parameter in the kEventClassKeyboard /
kEventHotKeyPressed Carbon Event is
kEventParamDirectObject (in, typeEventHotKeyID)
The ID of the hot key that was pressed.
That's the ID that was passed to RegisterEventHotKey. That's what you
should use to distinguish different hot keys.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
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