Keyboard handler

Is there a header or library that supplies access to the keyboard so that a program might capture statistics from the keyboard? In other words, can i gather information from the keyboard while the program runs as a kind of background service? I mean this other than stdin or stdout.

Is there a MFC class or function that can do this at all?
If you are using Windows, you need to install a "system" (aka global) keyboard hook function.
Start reading here:
http://www.google.com/search?btnI=1&q=msdn+SetWindowsHookEx

On other OSes you will have to use different methods.
Topic archived. No new replies allowed.