Enable access for assistive device programmatically
Enable access for assistive device programmatically
- Subject: Enable access for assistive device programmatically
- From: Manojkumar Yadav <email@hidden>
- Date: Sat, 13 Feb 2010 17:18:19 +0530
- Acceptlanguage: en-US, en-IN
- Thread-topic: Enable access for assistive device programmatically
Hi, I want to enable Access for assistive devices in System Preferences programmatically.
But Problem is that my application is not running as root user and i do not want my application to be as root user and also should not ask for any authentication in between. So is there any way to bypass authentication process? Please let me more clear about why this authentication is necessary.
Actually the need of my application is that I want to tap all keyboard events. I am using CGEventTapCreate() for the same. I want, that whenever my application runs ,all the keyboard events should get tapped. In the documentation of CGEventTapCreate() API it is mentioned that , Event taps receive key up and key down events if one of the following conditions is true:
1. The current process is running as the root user. 2. Access for assistive devices is enabled. In Mac OS X v10.4, you can enable this feature using System Preferences, Universal Access panel, Keyboard view.
I tried manually by checking the Enable Access for assistive devices from System Preference and it gives me expected output.
So is there any way to do the same via program without asking for authentication and also application is not running as root user.
Thanks.
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
|
_______________________________________________
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