Solved

Keystroke Count and Idle Time

Posted on 1998-03-20
1
311 Views
Last Modified: 2013-12-03
I support an app that is used by data-entry clerks running on win95, I'd like to capture their keystroke count and idle time for reporting.  Any nifty pieces of code or tips out there for capturing this type of info?

0
Comment
Question by:robsdman
1 Comment
 
LVL 11

Accepted Solution

by:
alexo earned 50 total points
ID: 1412185
See the SetWindowsHookEx() API.  You can capture keystrokes using a WH_KEYBOARD hook either globally or per-thread.  You can calculate the idle time by noting the time when each keystroke arrives.

See the SetWindowsHookEx() documentation.  Visual C++ also contains sample applications.

If you want to integrate the capturing into the application itself, you can preprocess the keyboard messages (WM_KEYDOWN, etc.) or WM_CHAR messages.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now