Hi all,

how to handle (or just get notified about) a keyboard or mouse event happened for any open window OR desktop itself.

what I want to do is just run in a loop sleeping 1 second before each iteration, checking if any mouse or keyboard event happened in any window, and if no such event happens in say 5 seconds then do something.

in short i want to detect if system was idle for a period of time. i can use c/c++. win32api OR MFC.

hope, someone knows something...