Thread-topic: EventMonitorTarget and background apps
on 2007-07-16 4:46 PM, Mike at email@hidden wrote:
> I have a simple Carbon app in which I install a monitor handler using
> GetEventMonitorTarget. I then use my handler to get keystrokes from
> other apps when they are typed.
> I now want to enable my app to run as a background-only app with no UI
> and still be able to get events in my handler when keys are typed.
> I added the two required flags, LSBackgroundOnly and LSUIElement to my
> app's Info.plist file and that works fine - my app launches in the
> background only.
> The problem is, when I launch my app in the background only, my monitor
> handler never gets called and I never receive any copies of the events I
> receive when my app is running as a normal GUI-based app.
> Is there something else I need to do in order to have my app run as a
> background only app and still be able to receive events on my monitor
You have to use Quartz event taps, new in Tiger. Find the "Quartz Event
Services Reference" document in Apple's documentation. You can download a
free demo application to test how event taps work at
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
PreFab Software - www.prefabsoftware.com
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden