On Mon, Dec 01, 2014 at 08:39:35PM -0800, Keith Lofstrom wrote:
> I want to time a sequence of events over about five
> minutes, pressing a keyboard key and adding a
> timestamp to a file.
> 
> I can do this by redirecting the output of xev to a
> file, then editing everything but the time field for
> the key presses and dividing by 1000, but there may
> already be a little program that does this the easy
> way.  Any suggestions?
 
perl -MTerm::ReadKey -e 'ReadMode 4; INPUT: while(1) \
   { while(not defined ($key =  ReadKey(-1))) { } \
    print scalar localtime; print " $key\n";  \
    if ($key eq "q") {last INPUT;} } ReadMode 0;'

-- 
      Michael Rasmussen, Portland Oregon  
    Be Appropriate && Follow Your Curiosity
Who was it who said that the secret of happiness is never to spend more
than $500 on a car, nor less than $500 on a bike.
        ~  Roy Bird
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to