overrider has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; use Term::ReadKey; # read a char directly from a keyboard via /dev/wskbd1 open(my $fh, '<', '/dev/wskbd1') or die "Couldn't open Keyboard\n"; ReadMode(5,$fh); my $key = ReadLine(0, $fh); print "You entered $key\n"; ReadMode('normal',$fh); close($fh);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading directly from a keyboard device, not simply <STDIN>
by Tanktalus (Canon) on Dec 16, 2008 at 03:50 UTC | |
by overrider (Acolyte) on Dec 16, 2008 at 05:26 UTC | |
|
Re: Reading directly from a keyboard device, not simply <STDIN>
by poolpi (Hermit) on Dec 16, 2008 at 11:38 UTC | |
|
Re: Reading directly from a keyboard device, not simply <STDIN>
by zentara (Cardinal) on Dec 16, 2008 at 14:49 UTC | |
|
Re: Reading directly from a keyboard device, not simply <STDIN>
by Sagacity (Monk) on Dec 16, 2008 at 16:21 UTC | |
|
Re: Reading directly from a keyboard device, not simply <STDIN>
by f00li5h (Chaplain) on Dec 16, 2008 at 05:11 UTC | |
by overrider (Acolyte) on Dec 16, 2008 at 05:30 UTC | |
by f00li5h (Chaplain) on Dec 16, 2008 at 23:58 UTC |