Programming keyboard lights for DAW

I am producing music (in Ableton Live) and will buy a pc keyboard with RGB lights, which will be used as such a software controller (play button, record button, etc.)

How can I program that while the software is recording, the recording button on the keyboard will flash? And while the software is playing, the play button on the keyboard will flash (Same as for the other function keys on the keyboard…)

By the way, If the keys can be flash at the BPM rate it would be great.

Many thanks in advance.