MozillaZine

Detect user activity?

Talk about add-ons and extension development.
Vano

User avatar
 
Posts: 400
Joined: December 26th, 2007, 8:21 pm

Post Posted November 20th, 2016, 11:40 am

Hello.

Is there a way detect user activity (mouse movement, key press) outside of mozilla application? by "outside of mozilla application" I mean when browser is minimized or not in focus.

I'm looking for a way detect when user is idle (away from computer) for NN period of time.

Also, is there a way detect when computer is about to go to sleep or if it just woken up, or when screen saver activated, these sort of things?

Thank you.

P.S.
Need it for non web-api extension

Vano

User avatar
 
Posts: 400
Joined: December 26th, 2007, 8:21 pm

Post Posted November 20th, 2016, 11:52 am

For the idle part I can use nsIIdleService

For sleep/wake on some systems can be used nsIObserverService observer to register sleep/wake notification.

Vano

User avatar
 
Posts: 400
Joined: December 26th, 2007, 8:21 pm

Post Posted December 4th, 2016, 7:48 pm

Is there any notifications available when user locks workstation?

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 3 guests