How to detect whether keyboard/mouse or controller was interacted with last

I can create the first node, have you active some plugin?