geekhack
geekhack Community => Off Topic => Topic started by: bsvP585hUO2Y6 on Fri, 19 June 2009, 07:22:39
-
Getting a keyboard with clear Cherry switches recently[1], I needed a
method to objectively compare it to my current blue cherry one to
decide on which one is more appropriate for me. The only objective
comparison I could imagine was typing speed and accuracy.
A long time ago I made a small shell script that monitored the
keyboard interrupt in /proc/interrups. This wasn't very useful
though: Although you could compensate for the duplicate interrups
(press + release) by dividing by two, leaning on a key - even the
control or shift keys - would cause lots of interrups due to auto
repeating. Another drawback was that USB keyboards won't generate any
interrupts at all because they are polled for data instead.
In my latest iteration, I'm using Linux 2.6's /dev/input facility
instead. This allows for easy filtering of auto-repeat events and
works with USB keyboards as well as the one hooked up to the PS/2
port. The attached keyboard.c[2] slurps events from stdin and outputs
a timestamp and a keycount every minute. You can use it like this to
generate a logfile:
# ./keycount < /dev/input/event1 > logfile &
[2] 16184
# tail -f logfile
1245412458 150
1245412518 236
...
Using GNU R[3] to plot the data, it looks like this:
(http://geekhack.org/attachment.php?attachmentid=2721&stc=1&d=1245413688)
Now only time can tell which keyboard is the winner...
Footnotes:
[1] geekhack.org IS bad for wallets
[2] Typing "make keyboard" in the same directory as keyboard.c should
yield a proper executable file on GNU/Linux
[3] a free software implementation of S, code for plotting attached as keycount.R
-
I like it!!
-
Holy cow, dude. Does your signature use this data and is it continuously updated? Looks like it.
-
Keymonger writes:
> Holy cow, dude. Does your signature use this data and is it
> continuously updated? Looks like it.
Ja, I'm still using the output of the C program in the original post,
but I'm now logging and plotting it using rrdtool (http://oss.oetiker.ch/rrdtool/). A hourly cronjob
uploads it during daylight hours using Perl's WWW::Mechanize (http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm).
rrdtool is commonly used to plot network traffic, but it appears to work
with slightly slower rates, too :-).
iMav writes:
> I like it!!
Phew, I guess that means I'm not getting banished for wasting bandwidth
with the automatic uploads then (169 kB/day)... But there needs to be
punishment for not allowing external images in signatures :-)
ripster writes:
> This is an interesting method to see what key switches you prefer -
> should remove the observer effect. Look forward to seeing your
> conclusions.
Well, I got a bit lazy tracking which keyboard was attached during what
time, but during the times I tracked them, I couldn't spot any
differences in the graph. So it didn't turn out to be useful for
comparing keyboards for me at all.
What I found surprising though is that - while I reach about 90 wpm at 1
percent error in ktouch - the rates on day-to-day work (working on my
diploma, making monies with programming and slacking to about equal
parts) are appalling in comparison. Even typing this post I didn't get
over 70 wpm...
(http://geekhack.org/attachment.php?attachmentid=13770)
(http://geekhack.org/attachment.php?attachmentid=13771)
(http://geekhack.org/attachment.php?attachmentid=13772)
(http://geekhack.org/attachment.php?attachmentid=13773)