Re: Now CGEventCreateKeyboardEvent just doesn't work...
Re: Now CGEventCreateKeyboardEvent just doesn't work...
- Subject: Re: Now CGEventCreateKeyboardEvent just doesn't work...
- From: Gregory Cooksey <email@hidden>
- Date: Fri, 6 Oct 2006 10:19:51 -0500
On Oct 4, 2006, at 11:27 AM, Ondra Cada wrote:
On 4.10.2006, at 16:37, Eric Schlegel wrote:
The recommended workaround is to call CFRelease(CGEventCreate
(NULL)) before calling the other APIs
thanks a lot.
Well... now it does not crash, but it does not seem to do anything
else, either. May I please ask for a bit more advice what am I
overlooking? I would think the following code should hide iTunes;
it does not though -- regardless the value of wait I try:
I think that I was unable to get events created with the default
source to work, but had success when I created and used a private
source:
/* psn holds target's PSN, code is keycode to send, state is up/down */
CGEventSourceRef source = CGEventSourceCreate
(kCGEventSourceStatePrivate);
CGEventRef ev = CGEventCreateKeyboardEvent(source, code, state);
CGEventPostToPSN(&psn, ev);
-Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden