I imagine an OS must keep track of when the last user input (keyboard or mouse use, for example) was, or of how long it's been since the last user input, in order to know when to run a screensaver.

Is there any way of seeing this information on MS Windows 7? I'm thinking of a program that will display a constantly updated number indicating the number of seconds since the last user input.


While windows does in fact do that, I am not sure how to go about collecting that info. Instead, why not just hook into the mouse/keyboard and set a timer up?


This is probably more of a programming question for Stack Overflow but...

There is a codeproject example in C# here: http://www.codeproject.com/KB/cs/globalhook.aspx

"Processing Global Mouse and Keyboard Hooks in C#" by George Mamaladze | 12 Nov 2008

If you use this you may want to read some of the comments at the bottom of the article that talk about resolving issues between Windows XP and Windows 7.

  • If it's a programming question, that's unfortunate, as my programming skills are next to nil. That's why I asked it here, hoping for a built-in solution in the OS. Thanks for the link, though. – msh210 May 31 '11 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.