CGEvent with double click
CGEvent with double click
- Subject: CGEvent with double click
- From: Joe Turner <email@hidden>
- Date: Wed, 18 Aug 2010 18:56:43 -0600
Hello,
I'm trying to post an event (using CGEventRef) that at least behaves like a double click (even if it's not officially one). What I do now is immediately have a down click, then .01 second later have an up click, then .1 second later have a down click, and then .01 second later have an up click. It works perfectly as two consecutive clicks, but doesn't trigger a double click. I know the timing is not an issue, because my double click delay right now is currently at at least .5 seconds. Is there something special I have to do to trigger it? What about triple-click?
This is my code for each down click. To get the up one just replace "kCGEventLeftMouseDown" with "kCGEventLeftMouseUp". source is already defined and works.
CGEventRef mouseEvent = CGEventCreateMouseEvent(source, kCGEventLeftMouseDown, point, kCGMouseButtonLeft);
CGEventPost(kCGHIDEventTap, mouseEvent);
CFRelease(mouseEvent);
Thanks,
Joe
_______________________________________________
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