How to check if the mouse cursor is moving?

In TripleJump I wanted to automatically hide the mouse if the cursor had not moved in a little while.
I’m not sure if that’s what you are trying to do as well but here’s the code I used to do that: