<strong>Need to detect user <em>inactivity</em> while in background. </strong>(by checking mouse/keyboard or other?)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, November 27, 2001 06:26 AM

Hi, I'm currently writing a swing application in which I need to detect if the user has been away from their machine for a certain period of time (like ICQ's auto-away) and have been having trouble finding information on how to detect this condition. Currently I've added awt event listeners to the awt default toolkit in an attempt to grab events outside of my application's window with no luck. After the focus leaves my application I have no way of knowing if they're active or not.. I can detect if they've been active in my application but not otherwise, which is useless since the program waits in the background 90% of the time :-P Does anyone perhaps have an alternate solution to waiting for mouse/keyboard events? Or a way to poll t   More>>

Hi, I'm currently writing a swing application in which I need to detect if the user has been away from their machine for a certain period of time (like ICQ's auto-away) and have been having trouble finding information on how to detect this condition.



Currently I've added awt event listeners to the awt default toolkit in an attempt to grab events outside of my application's window with no luck. After the focus leaves my application I have no way of knowing if they're active or not..



I can detect if they've been active in my application but not otherwise, which is useless since the program waits in the background 90% of the time :-P



Does anyone perhaps have an alternate solution to waiting for mouse/keyboard events? Or a way to poll the system for the mouse position without having to wait for an event?




Thanks,

-CJ    <<Less
About | Sitemap | Contact