post hidden mouse events
post hidden mouse events
- Subject: post hidden mouse events
- From: "Giovanni Donelli" <email@hidden>
- Date: Thu, 3 May 2007 15:18:52 +0200
Dear Folks,
my app needs to synthesize mouse events. To do so I have first
used the following API:
CGError CGPostMouseEvent (
CGPoint mouseCursorPosition,
boolean_t updateMouseCursorPosition,
CGButtonCount buttonCount,
boolean_t mouseButtonDown,
...
);
However as documentation says:
"This function is not recommended for general use because of
undocumented special cases and undesirable side effects."
And it is indeed buggy as hell... there are undesirable side effects
on some user machine, so following the documentation advice:
I am using CGEventCreateMouseEvent and posting the event with CGEventPost.
Now I found lots of bugs (in the API) that were discussed on this list
already, but I did figure out finally a way to make everything work.
The only issue I have with this (CGEventPost solution) is that the
cursor also change position on the screen...
Any suggestion on how I can post mouse events without updating
MouseCursorPosition as in the CGPostMouseEvent API??? relocating the
mouse each time after a mouse down/up operation is not an option.
Thank you,
Giovanni
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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