TermReadKey module from CPAN question

D

Dan

I trying to use this module to disable user's interaction from
keybord.

sub test1
{

.... dialog --yesno..... "Dialogbox 1"

use Term::ReadKey;
ReadMode 4; # Turn off controls keys
while (not defined ($key = ReadKey(-1)) {
# No key yet
}
print "Get key $key\n";
ReadMode 0; # Reset tty mode before exiting

.... dialog --yesno..... "Dialogbox 2"
}


but the problem, that ALL user's interactions (keys pressing) saved in
buffer and after ReadMode 0 all these pressing are implemented!!!

Some ideas, how it can be resolved?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top