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

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top