Christian, Yes, indeed, you're right. It's an Apple security mechanism.
Reading your PDF doc, I found this (version 14.2, page 3974): For added security, GetEventMonitorTarget requires that ”Enable access for assistive devices” be checked in the Universal Access preference pane in order to monitor RawKeyDown, RawKeyUp, and RawKeyRepeat events. If this control is not checked, you can still install handlers for these events on the event monitor class, but no events of these types will be sent to your handler. Administrator privileges are required to enable this feature. Accessibility made need to be turned on. On Mac OS X 10.9 this may not work in debug apps, but only in build apps after second launch. As "Enable access for assistive devices" no longer exists in the Accessibility pane on Mavericks (and next, I guess), I searched on the Net and found this: _http://www.tekrevue.com/how-to-enable-access-for-assistive-devices-in-os-x-mavericks/__ _ Now, we have to open the "Security and Privacy" pane, Privacy and then Accessibility to find a list of applications trying to control the Mac and needing to be authorized. This, of course, requires Admin privileges. I authorized your "Carbon Events Test" sample app (compiled) and it works! Now, keybord events as RawKeyUp and RawKeyDown are monitored, even when the app is in the background. Finally, I have a question: How could I authorize programmatically such an app (after requesting Admin password, of course)? Is this possible, or is there the only way to ask the user to do it by himself (which could need a lot of explanations)? Thanks for your help. Jean-Luc Arnaud Le 28/08/2014 13:10, Christian Schmitz a écrit : > Am 28.08.2014 um 12:58 schrieb Jean-Luc Arnaud <[email protected]>: > >> Hi all, >> >> How could I modify the code in order for simple keys to be monitored and >> intercepted in background? > Sorry, not sure. > This may be a security thing forced by apple. > > Sincerely > Christian > _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
