Re: Programming hot key
Re: Programming hot key
- Subject: Re: Programming hot key
- From: Matt Neuburg <email@hidden>
- Date: Wed, 04 Nov 2009 08:05:00 -0800
- Thread-topic: Programming hot key
On Tue, 03 Nov 2009 20:06:50 -0800, Eric Schlegel <email@hidden> said:
>
>On Nov 3, 2009, at 6:10 PM, Symadept wrote:
>
>> Hi,
>>
>> Anybody tell me can I program a hot key which shall not block the other apps
>> responding to it.
>>
>> Lets say I have registered hot key Command+P for some operation for my app,
>> it shall not block the other apps responding to it.
>
>You should probably use the CGEventTap API to implement this. In SnowLeopard,
you could also use +[NSEvent addGlobalMonitorForEventsMatchingMask]. In either
case, however, I believe you'll need the user to enable access for assistive
devices in the Universal Access preference pane.
But isn't the real problem that there is no API for discovering what global
hot keys are registered with the system? I've been asking for this since Mac
OS X 10.0; not only do apps need it, users need it. The system must *know*
this, since it responds to the global hot keys; so why won't it reveal this
info? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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