Term::Screen::ReadLine is a Perl module that extends Term::Screen with a readline() function. It also makes it possible to use a *single* Esc to escape instead of the Term::Screen double Esc.
SYNOPSIS
use lib "./blib/lib";
use Term::Screen::ReadLine;
$scr = new Term::Screen::ReadLine;
$scr->clrscr();
$a=$scr->getch();
print $a," ",length $a," ",ord($a),"
";
$scr->two_esc;
$a=$scr->getch();
print $a," ",length $a," ",ord($a),"
";
$scr->one_esc;
$scr->clrscr();
$scr->at(4,4)->puts("input? ");
$line=$scr->readline(ROW => 4, COL => 12);
$line=$scr->readline(ROW => 5, COL => 12, DISPLAYLEN => 20);
$scr->at(10,4)->puts($line);
$scr->two_esc;
$line=$scr->readline(ROW => 6, COL => 12, DISPLAYLEN => 20, ONLYVALID => "[ieIE]+", CONVERT => "up");
print "
";
print $scr->lastkey(),"
";
$r=$scr->getch();
print $r,ord($r),"
";
$r=ord($r);
print $r,"
";
if ($r eq 13) {
print "aja!
";
}
Product's homepage
Requirements:
· Perl