Detect user activity?

Talk about add-ons and extension development.
Post Reply
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Detect user activity?

Post by Vano »

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
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Re: Detect user activity?

Post by Vano »

For the idle part I can use nsIIdleService

For sleep/wake on some systems can be used nsIObserverService observer to register sleep/wake notification.
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Re: Detect user activity?

Post by Vano »

Is there any notifications available when user locks workstation?
Post Reply