This group of four macros (and a fifth sample macro which demonstrates how to use them) shows how to independently get the idle time of the keyboard and mouse. KM already has a function called IDLE() but it combines the mouse and keyboard into a single idle time value. IDLE() returns a decimal value measured in seconds, but in these macros I chose to use milliseconds. That's a personal preference of mine.
There may not be many people who need to know the idle time of the mouse and keyboard separately, but I did at one time. So I wrote this for myself. It may also be a useful/simple illustration of subroutines, timers and a wildcard text trigger.
It looks like these are the remaining four macros for the same folder. I'm not sure if the sample macro in the first link now needs to be modified or not.