How to mesure the inactivity time

Adel ESSAFI adelessafi at gmail.com
Tue Mar 3 10:41:33 UTC 2009


Thanks,


How ever, I am searching for more low level procedure. I mean, is there any
event or interruption that the system produces then the user come leaves or
take back his machine.



Regards


Adel



2009/3/2 Matthew Flaschen <matthew.flaschen at gatech.edu>

> Adel ESSAFI wrote:
> > Hi list
> >
> >
> > I am developping a tool with java and I want to know the inactivity time
> > of the user, i.e, the duration of the time that the keybord and mouse
> > were not used.
>
> Use a static variable (secondsSincePress) in your main class (e.g.
> MyProgram), add a keyPressed method (along with blank methods for the
> rest of the KeyListener interface) that sets secondsSincePress to 0,
> then call MainJFrame.addKeyListener from MyProgram's main.  It is
> basically the same thing for mouse (MouseListener), except I don't think
> there's any way to detect mouse /movements/ (only presses and entering
> and leaving the window).
>
> Let us know if you still have questions.
>
> Matt Flaschen
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines:
> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>



-- 
http://ilovefedora.blogspot.com/

-- 

PhD candidate in Computer Science
Address
BP 108, Bureau de poste Tunis republique
1001 Tunis
Tunisia
tel: +216 97 246 706
fax: +216 71 391 166
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090303/cb1ef8b4/attachment-0001.htm>


More information about the fedora-list mailing list