Miker has asked for the wisdom of the Perl Monks concerning the following question:
Is there any way to check for a key-press that does not wait? Sort of check it on the fly, or periodicly? TIA, MikerUse HotKey.pm; foreach $i (@things) { &program_running($i); while ($keyboard = readkey) { # This is the gotcha if ($keyboard =~ /b/) { print "you pressed b \n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: When is a while not a while?
by mikfire (Deacon) on Aug 24, 2000 at 19:15 UTC | |
by Miker (Scribe) on Aug 25, 2000 at 00:13 UTC | |
by Miker (Scribe) on Aug 24, 2000 at 22:43 UTC | |
|
RE: When is a while not a while?
by jreades (Friar) on Aug 24, 2000 at 19:06 UTC | |
by tilly (Archbishop) on Aug 24, 2000 at 19:25 UTC | |
by jreades (Friar) on Aug 25, 2000 at 16:47 UTC | |
by merlyn (Sage) on Aug 25, 2000 at 17:39 UTC | |
by tilly (Archbishop) on Aug 25, 2000 at 17:49 UTC | |
by jreades (Friar) on Aug 25, 2000 at 22:03 UTC | |
| |
by Miker (Scribe) on Aug 24, 2000 at 19:11 UTC |