cfischer
cfischer

Reputation: 24912

Toggle "Illuminate keyboard" without using private APIs

Is there a way to turn on and off the "Illuminate keyboard" setting programmatically, without using private APIs?

I need to do it in a way that will be accepted by the Mac App Store.

Upvotes: 2

Views: 143

Answers (1)

Laurent Etiemble
Laurent Etiemble

Reputation: 27889

You can try to use the ScriptingBridge framework; it works by sending Apple events. The System Preferences application exposes ScriptingBridge bindings so you can access it.

Here some starting points:

If you go with ScriptingBridge and want to submit your application the Mac App Store, then you have to request a temporary exception entitlement to allow your application to send Apple events; check the Entitlement Key Reference to learn more about it.

Upvotes: 2

Related Questions