[lug] keystroke statistics

Riggs, Robert RRiggs at doubleclick.net
Mon Apr 16 10:51:05 MDT 2001


Hmm... it doesn't appear binary to me, but it does look like there is an
interrupt for a key press and key release. One my machine it seems to count
2 interrupts per regular key stroke (+ others when keys repeat), and 4
interrupts for arrow keys. Maybe the simple method is not so simple after
all.

-----Original Message-----
From: Todd Ruskell [mailto:truskell at Mines.EDU]
Sent: Monday, April 16, 2001 10:38 AM
To: lug at lug.boulder.co.us
Subject: Re: [lug] keystroke statistics


Is that a binary number?  Empirically, it looks like it must be.  For
example, if I simply do an "up-arrow" and "return" to repeat the previous
command, the value goes from

******19

to

******29

which is consistent with a binary, so you'd have to make sure and work in
the proper base.

Todd

"Riggs, Robert" wrote:

> I'd go for the ridiculously simple... "grep keyboard /proc/interrupts" at
> the start and end of the day and subtract.
>

--
Todd Ruskell, Ph.D.
Lecturer in Physics
Colorado School of Mines
Golden, CO 80401
303-384-2080
Fax: 303-273-3919



_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list