Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked
Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked
- Subject: Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 08 Mar 2011 05:52:39 -0500
On Mar 7, 2011, at 10:40 PM, Deepa wrote:
> But, sometimes (randomly) the callback is not invoked; Hot Key does not work and hence the feature seems to be not working.
I haven't analyzed your code, but I would suggest that you revise it to capture all the errors that the event tap functions might generate, then see what you see.
Also, one possibility is that the system might occasionally disable the event tap, if it gets overloaded. The Quartz Event Services Reference document explains how to test in your callback for system disabling or user disabling the event tap. When the system disables it, your code can simply re-enable it immediately. Every event tap callback should do this to avoid the problem you are seeing.
--
Bill Cheeseman - email@hidden
_______________________________________________
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