1

I am on a MacBook Pro 13-inch with Big Sur installed in it. I want to know whether there is any third party app or terminal command, which transitions the keyboard backlight from 0 brightness to max brightness and vice versa gradually, like it happens in RGB keyboards.

Thank You.

9
  • 1
    See also apple.stackexchange.com/questions/157878/…; especially github.com/pirate/mac-keyboard-brightness
    – lhf
    Commented Sep 16, 2021 at 11:25
  • 1
    Sure, write a simple script that runs kbrightness in a loop with varying brightness.
    – lhf
    Commented Sep 16, 2021 at 11:53
  • 1
    I ran kbrightness once and it worked for me, but I can't vouch for its safety or anything.
    – lhf
    Commented Sep 16, 2021 at 12:09
  • 1
    Open the Terminal at the folder containing kbrightness and run ./kbrightness and ./kbrightness 0.4. (Tested in Catalina, not Big Sur.)
    – lhf
    Commented Sep 16, 2021 at 12:44
  • 1
    Perhaps ask in stackoverflow.com
    – lhf
    Commented Sep 16, 2021 at 12:58

1 Answer 1

1

I have reached my goal, and have created a piece of code which makes my keyboard glow like the RGBs.

The Kbrightness file is downloaded from this site. It is stored in the same folder as the python file.

Code involved:

import os
from time import sleep

value = 0.00


def change_brightness():
    os.system(f"./kbrightness {value}")


while True:
    while value <= 1.00:
        value +=0.01
        change_brightness()
        sleep(0.01)
        if value == 0.99:
            break
    while value >= 0.00:
        value -=0.01
        change_brightness()
        sleep(0.01)
        if value == 0.01:
            break

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .