I am developing a react web app that contains the functionality of idle time detection(small scale project). The app should detect the whole system's(OS) idle time. If the user closes the browser I mean not the case user idle for the app, but for the whole system/OS: no keyboard input, no mouse operation, no-touch even when no focus on the app or app is minimized. Is there any way to implement this?
Asked
Active
Viewed 1,612 times
1
-
Not possible... – Bhojendra Rauniyar Aug 12 '20 at 14:44
-
Nope... you could get the idle time the user or client remains inactive ON the web application. Not outside – Giovanni Esposito Aug 12 '20 at 14:46
1 Answers
0
Here is an example project of implementing idle-timeout in React. You can clone this project and run it on your machine.
// clone the project
git clone https://github.com/bbachi/react-idle-timeout.git
// install dependencies and start the project
npm install
npm start
This is a simple project which has two screens: login screen and dashboard screen.
When you log in with any username and password, dashboard displays with some user table. If you are idle for 5 seconds we are going to let the user know with a modal window and if the user is still idle after 5 seconds, the user will be logged out.
For details, this blog post seems to support the idea.

V-Q-A NGUYEN
- 1,497
- 16
- 19