Is there any way to get IdleLeds to execute a macro when it is shutting down or turning on the leds?

I am getting close to all the things I would like on my Arduino sketch, but one thing eludes me: I want my keyboardio to reset to a standard configuration if I do not touch it for a long time. I was able to make changes to OneShot so all keys that were sticky would clear themselves after a given time interval, but I have since added SpaceCadet. Since OneShot and SpaceCadet were not playing well together, I created a macro that switches which of the two are enabled at any given time, and that works well… except when I walk away and forget in which mode I am. I would like to be able to call a function when the leds are turned off to enable OneShot and disable SpaceCadet, or, equivalently, to do so when the leds are turned on again. I can do that when the computer goes to sleep, but I’d like something that works even if only the keyboardio leds are being turned off due to time out.

Any ideas?

–Luis Nakano.