Re: How to mesure the inactivity time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
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@xxxxxxxxxx
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
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux