in reply to Re: Re: Re: Reading all nonblocking keystrokes in Win2000
in thread Reading all nonblocking keystrokes in Win2000
I tried the following:
#!/usr/local/bin/perl5 # Use Perl 5 use Term::ReadKey; my $c = ""; ReadMode(5); while ($c ne "q") # Press q to exit { $c = ReadKey(-1); if (ord($c) == 0) { $c .= ReadKey(-1); } if ($c ne "") { print ord $c; } } ReadMode(0);
It didn't seem to work. How can Win32Peek() be hidden? I didn't even know this was possible in perl. There are a few things that bother me about Term::ReadKey:
-----------------------------------
Washizu
The best offense is a good offense.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Reading all nonblocking keystrokes in Win2000
by tye (Sage) on Nov 19, 2001 at 21:27 UTC | |
by Washizu (Scribe) on Nov 19, 2001 at 21:40 UTC | |
by tye (Sage) on Nov 19, 2001 at 21:51 UTC |