Sunday, April 3, 2011

user key/mouse input tracking. C#

I want to track how long i been away from my keyboard/how long i took a break. I figure tracking my keyboard and mouse is a good way to see when i left and arrived. Whats the best way to track this? Some options i see

  • Have a system wide callback for every mouse and keyboard press.
  • Sleep for a 100ms and see if there is a keydown or mousemovent
  • Use a system call that actually tells me when the last userinput was and use a combo of the above for efficiently. (sleep until user is away, then use callback to track arrival)
From stackoverflow

0 comments:

Post a Comment