austin43 has asked for the wisdom of the Perl Monks concerning the following question:
Currently, if you hold down 'r', it will call &subroutine1 multiple times. Is there a way to make the keys only read once when held down? Thanks in advance.use Term::ReadKey; ReadMode(4); my $input = lc(ReadKey(0)); if ($input =~ m/r/) { &subroutine1; } ReadMode(0); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ReadKey only read once?
by SuicideJunkie (Vicar) on Mar 31, 2011 at 18:09 UTC | |
|
Re: ReadKey only read once?
by ambrus (Abbot) on Mar 31, 2011 at 19:35 UTC | |
|
Re: ReadKey only read once?
by wind (Priest) on Mar 31, 2011 at 18:06 UTC | |
by austin43 (Acolyte) on Mar 31, 2011 at 18:20 UTC |