I'm trying to make what I think is a basic script in Blender 2.9.1; however, for this to work I need to check if the user performs any form of interaction in the current workspace (essentially if they're idle or not). How can I go about performing this check? I've looked through the API documentation, but I haven't been able to find anything that does this. The only real approach to this I can think of would be to go through all operators and add a check to see if they're performed perhaps.
If someone could point me in the right direction, I would really appreciate it!