I don't know this is possible in app script. But I want to ask if it is possible the how. So my question is If mouse or keyboard not moveing then can we capture the start time and end time as idel time. If yes the plese guide or help me on this
There is no event for "not" doing something so you need to keep track of a timer and reset it every time the mouse moves or the keyboard is pressed. It will look something like this:
let dtStart = new Date();
window.addEventListener('mousemove', function(event){
let diff = new Date() - dtStart;
console.log(diff)
dtStart = new Date()
}
window.addEventListener('keydown', ... <-- same thing as onmousemove