State-based lighting for capslock, numlock, and scroll lock

For keyboards that don’t implement it natively, it would be nice to be able to change the RGB illumination of particular keys based on their state; for instance, highlight the various *lock keys when they are active. Bonus points for allowing arbitrary key painting overrides via the API.