How to make a setTimout but only when there is no action on the screen?

Asked

Viewed 28 times

0

I’m looking for an idea, as I do a Settimout only when the user leaves the page. Example, I’m with 2 screens. One is the Reset screen and another is the home. when user enters the system he goes home, while he is moving nothing happens, if he stops fidgeting for a few x seconds fires a setTimout and leaves the screen from the home to the Reset.

  • Take a look at this link that explains what you need: Detect Idle - Basically it’s adding events to all mouse and keyboard actions, and when you stop checking, start a setTimeOut... now the logic for this must be well worked out.

  • Thanks friend I’ll take a look. Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.