This should get you started:
#! perl -slw use strict; use Term::ReadKey; while( 1 ) { my $key = ReadKey 0.1; print 'Got: ' , defined $key ? "'$key'" : ' nothing!'; } __END__ c:\test>"ReadKey(Term).pl" Got: nothing! ... Got: nothing! Got: ' ' Got: nothing! ... Got: nothing! Got: 'v' Got: nothing! Got: nothing! Got: nothing! Got: 'V' Got: nothing! ... Got: nothing! Terminating on signal SIGINT(2)
In reply to Re: Capture keypress while process running
by BrowserUk
in thread Capture keypress while process running
by jcsoybomb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |