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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top