Re: Processing mouse clicks using Quartz events
Re: Processing mouse clicks using Quartz events
- Subject: Re: Processing mouse clicks using Quartz events
- From: Kyle Sluder <email@hidden>
- Date: Wed, 16 Feb 2011 00:15:39 -0800
On Feb 15, 2011, at 11:23 PM, Tomáš Znamenáček<email@hidden> wrote:
> I have a system utility application that needs to be triggered by a mouse click on certain UI elements. In all applications, not just mine. When the application notices the right kind of a mouse click, I want to “steal” the event to prevent it from being processed by the system and do something of my own.
>
> I looked into NSEvent global monitoring, but that does not allow me to modify the events. Is there another way to monitor and change the system mouse events?
Sounds like you want a Quartz event tap filter. You can create one using CGEventTapCreate. Though I'm kind of curious how you're able to determine the user is clicking on something interesting in arbitrary applications, and what that interesting thing may be.
--Kyle Sluder_______________________________________________
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