Is there any command to control the intensity of keyboard light of a MacBook Pro?
3 Answers
I haven't found a great solution yet. Here is some information that can help:
Apparently there is a solution for Ubuntu on MacBooks.
Lab Tick runs on OS X but unfortunately not command-line (nor open source).
brightness
is free software to control the display brightness.
This turns off automatic backlight in low light:
defaults write com.apple.BezelServices kDim -bool false
This turns off keyboard illumination when computer is not used for 1 second:
defaults write com.apple.BezelServices kDimTime -int 1
But ideally I would just turn off the illumination under all circumstances. And I haven't found a CLI solution for that - yet.
-
3Not sure whether this will still work (and don't have time to check), but there's some code here: osxbook.com/book/bonus/chapter10/light Commented Oct 29, 2015 at 11:45
-
3This exists for <2015 macs: github.com/pirate/mac-keyboard-brightness– NimrodCommented Feb 4, 2021 at 9:12
This app can do it, using the (undocumented) CoreBrightness library built in to macOS. It works on my M2 MacBook Pro (2023 model). You can add custom themes or change the program to work to your liking. I modified it to run through the animation just once, not "forever" in a loop, and I set up simple "backlight on" and "backlight off" animations to call.
Have you tried the f5 key? That changes my keyboard light.
-
2This does not remotely answer the question. He asked for a solution from the command line not from the keyboard function key. Commented Nov 25, 2014 at 0:42