2007-11-28 01:07:32

by Nelson Castillo

[permalink] [raw]
Subject: Module for keyboard statistics / What should I look at?

Hi.

More than 2 years ago I wrote a small non-portable patch [1] to gather
some statistics
about keyboard usage[2] ( I show the counters with modulo 10 but still this is a
security risk. Perhaps some random noise should be added ).

[1] http://svn.arhuaco.org/svn/src/pcgotchi/trunk/proc-keystrokes.patch.linux-2.6.12.2.txt
[2] http://pcgotchi.blogspot.com/2005/10/11140-times.html

I liked to use this in my PC but stopped using this because I didn't
want to compile whenever I
upgraded Kernels (Debian).

I thought I had already asked in LKML as suggested by Blaisorblade[3],
but I did ask in
kernelnewbies instead[4].

[3] http://www.mail-archive.com/[email protected]/msg02168.html
[4] http://mail.nl.linux.org/kernelnewbies/2006-05/msg00367.html

My questions are:

* What should I read to do this in a module?
* Is there a better way to to this? (perhaps using /dev/input/... and
a user-space program) ?

Regards,
Nelson.-

PS: I don't wish to write a keylogger. I really want the statistics
and you are screwed if
someone gets to be root in your machine anyway.

--
http://arhuaco.org


2007-12-03 19:54:22

by Pavel Machek

[permalink] [raw]
Subject: Re: Module for keyboard statistics / What should I look at?

On Tue 2007-11-27 20:07:16, Nelson Castillo wrote:
> Hi.
>
> More than 2 years ago I wrote a small non-portable patch [1] to gather
> some statistics
> about keyboard usage[2] ( I show the counters with modulo 10 but still this is a
> security risk. Perhaps some random noise should be added ).

RSI prevention?

> My questions are:
>
> * What should I read to do this in a module?
> * Is there a better way to to this? (perhaps using /dev/input/... and
> a user-space program) ?

Yep, I think you should be using /dev/input.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html