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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux