Solved

Keystroke Count and Idle Time

Posted on 1998-03-20
1
326 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 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