Re: CGevent and cocoa compatibility
Re: CGevent and cocoa compatibility
- Subject: Re: CGevent and cocoa compatibility
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 02 May 2008 06:15:01 -0400
- Thread-topic: CGevent and cocoa compatibility
on 2008-05-02 4:34 AM, John Clayton at email@hidden 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 user
to turn on the "Enable access for assistive devices" setting in the
Universal Access pane of System Preferences.
Traditionally, apps that require this setting to be turned on test whether
it is on and, if not, ask the user to turn it on (often opening the
Universal Access pane for the user on request). Starting with Tiger, you can
turn this setting on programmatically by embedding an AppleScript script in
your application, but it requires the user to authenticate and leave the
setting turned on globally. Starting with Leopard, you can make a single
application "trusted" by accessibility, by authenticating once at install
time or first launch without turning on the global setting at all (this
feature was implemented in Tiger but is said to have been rendered useless
by a bug; I haven't tried it in Tiger, but I suspect it might actually have
worked if done right).
However, I'm not sure event taps will notice the special function keys on
any keyboard. The OP could do some initial testing of this with my free
PreFab Event Taps Testbench application, here:
<http://prefabsoftware.com/eventtapstestbench/>.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.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