Apple quietly removed the dedicated keyboard backlight keys from newer MacBook layouts. Touch ID and Spotlight took their spots. The brightness can still be changed โ€” but you have to dig into Control Center every time. Annoying.

Hammerspoon can post the same system events that the old keys did, so you can bind them to whatever combo you like.

In my ~/.hammerspoon/lib/settings.lua I keep my modifier combos:

hs.settings.set('fnkeyCombo', {'fn', 'ctrl'})

And in lib/shortcuts.lua I bind fn+ctrl+F1 and fn+ctrl+F2 to the illumination events:

-- Illumination Down
hs.hotkey.bind(hs.settings.get('fnkeyCombo'), 'f1', function()
  hs.eventtap.event.newSystemKeyEvent('ILLUMINATION_DOWN', true):post()
  hs.eventtap.event.newSystemKeyEvent('ILLUMINATION_DOWN', false):post()
end)

-- Illumination Up
hs.hotkey.bind(hs.settings.get('fnkeyCombo'), 'f2', function()
  hs.eventtap.event.newSystemKeyEvent('ILLUMINATION_UP', true):post()
  hs.eventtap.event.newSystemKeyEvent('ILLUMINATION_UP', false):post()
end)

Two events per binding (true/false) simulates a key down + key up. Some system events ignore the up event but itโ€™s cheap insurance to send both.

Reload your config and youโ€™ve got your old backlight keys back, just under a different combo.