How to control led brightness with one keyboard button

I've just tried it out and I think I could use this code!! Thank you so much you guys saved my life :innocent: