Skip navigation.
 
mlRe: CGevent and cocoa compatibility
FROM : Bill Cheeseman
DATE : Fri May 02 12:15:01 2008

on 2008-05-02 4:34 AM, John Clayton at <email_removed> 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_removed>
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com

PreFab Software - www.prefabsoftware.com

Related mailsAuthorDate
mlCGevent and cocoa compatibility Ben Lachman May 2, 08:32
mlRe: CGevent and cocoa compatibility John Clayton May 2, 10:34
mlRe: CGevent and cocoa compatibility Bill Cheeseman May 2, 12:15
mlRe: CGevent and cocoa compatibility Ben Lachman May 2, 19:03