my jabber client can detect when i haven't moved my mouse or pressed a key on the keyboard for a while.  is there an easier way to keep track of that than resorting to hooks.  i'm just not a fan of system hooks and i guess i would have to use the CBT hook for that.  is there a less intrusive way to do that?
Posted on 2005-05-27 07:59:06 by rdaneel
You could use low-level mouse and keyboard system hooks, they use less resources but work only on NT, XP and 2K.
Posted on 2005-05-27 17:52:54 by QvasiModo
rdaneel, have a look if the jabber client works in non-admin mode... if it does, there's probably another way :) (jabber is opensource, right? you could ask the developers how they do it, and post back here).
Posted on 2005-05-27 19:45:15 by f0dder
Yeah, it uses normal windows hooks.  At least the client I use does.  I ended up using the new GetLastInputInfo api call in Win2K+ since we only use XP.

Dave
Posted on 2006-04-12 20:28:09 by rdaneel
Ideas:

1- check out WH_FOREGROUNDIDLE hook.
2- check out the SC_SCREENSAVE notification :)
Posted on 2006-04-20 01:26:35 by Homer
You could also use GetCursorPos and GetKeyboardState apis monitoring for difference's to the previous state.
While this would remove the dependency on hooks I'm not sure if it would be less taxing on the system.
:sad:
Posted on 2006-08-17 08:59:38 by asmrixstar