Trigger with keyboard and mouse inactivity

Chat software like MSN Messenger often have a facility to detect the users "away" status. This is basically done by when there is no keyboard/mouse input for a pre-specified period of time. I have no professional Windows programming experience, and I want to know if there are ready made APIs (loosing platform independence is ok in my particular deployment) that will detect mouse and keyboard inactivity.

Java can only monitor events happening within the Java VM. So if I have my Frame minimized, no AWTevents/Mouse/Keyboard events are detected even though I may still be at my desk.

Is there code out there that I can use that internally handles all the Windows stuff, but has a nice Java Wrapper that I can call?

TIA,

Carlos

[766 byte] By [carlosnf] at [2007-9-26 4:09:32]
# 1

actually u cant do that with java, unless there is a way to hooks into the Windows mouse and keyboard WH_KEYBOARD_LL and WH_MOUSE_LL hooks.

you can do that from C++ or C# Application but i dont think with java u can do this, but my question is, does java has something seemlier to this to apply it to any other operating systems?

-tawammar- at 2007-6-29 13:12:40 > top of Java-index,Desktop,Core GUI APIs...
# 2

Here are some search results for "Java inactivity"

Both have soruce code to detect user inacticity.

http://www.devx.com/getHelpOn/10MinuteSolution/20437

http://www.javakb.com/Uwe/Forum.aspx/java-gui/2628/Inactivity-detect

jvaudry at 2007-6-29 13:12:40 > top of Java-index,Desktop,Core GUI APIs...