You can turn off keyboard backlighting automatically by pressing F5 or Fn + F5 on your Mac keyboard repeatedly till it turns off. If you’re using one of Apple’s more recent Macbook Pros with the touch bar, simply find the keyboard backlight button on Touch Bar and press it repeatedly. If you want your Mac to automatically turn off the keyboard’s backlight after a specific time of inactivity, you can do so by following the below steps.
Open System Preferences. You can do this by either searching in Spotlight or by accessing “Finder -> Applications -> System Preferences.”
Select “Keyboard.”
Enable the option “Turn keyboard backlight off after __ seconds of inactivity.”
From the drop-down menu, choose the time of inactivity that will force the keyboard backlight to turn off.
Also, make sure you disable “Adjust keyboard brightness in low light” so that the keyboard backlight doesn’t reactivate by itself. Remember to activate the keyboard backlight again at any time by simply pressing F6 (Fn + F6) or the Increase Keyboard Backlight on your Touch Bar, and press it repeatedly until the backlight is sufficient for you. If at any time you see the keyboard lighting locked (screenshot below) symbol, it most probably means that the ambient light sensor on MacBook Pro / MacBook Air models has detected too much light. The will force the the keyboard illumination to not turn on.
A simple fix for this is covering the ambient light sensor on your Mac, which is located next to the Facetime camera.