CGevent and cocoa compatibility

2008-05-02 Thread Ben Lachman
Does anyone know how to get the keycode out of a NX_SYSDEFINED CGEvent? If so, is that keycode the same thing you'd get out of say (([event data1] 0x) 16)? I'm trying to support the media keys on the Apple aluminum keyboards without having iTunes also get the events. Thanks,

Re: CGevent and cocoa compatibility

2008-05-02 Thread John Clayton
Probably means you'll need to use the event taps API and swallow the event - which is relatively simple to achieve as long as you can install an event tap that isnt a listener only. I presume since you're already talked about CGEvent structures, that this is indeed what you are doing -

Re: CGevent and cocoa compatibility

2008-05-02 Thread Bill Cheeseman
on 2008-05-02 4:34 AM, John Clayton at [EMAIL PROTECTED] wrote: Installing an event tap that modifies the event chain won't require special privs (from memory), so long as you don't install it at the window server level. Working with the key down and key up events via event taps requires the

Re: CGevent and cocoa compatibility

2008-05-02 Thread Ben Lachman
Yup, this is true as far as I can tell. I've got the event tap installed, the issue is that I'm not able to pull any useful data out of NX_SYSDEFINED typed events. Any thoughts on that? -Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com email: [EMAIL PROTECTED]