Search notes:

Perl module Term::ReadKey

use warnings; use strict;

use Term::ReadKey;


my $raw_mode = 4; # Turn off controls keys ?
my $restore_original_settings = 0;

my $normal_read_using_getc =  0;
my $non_blocked_read       = -1;
my $wait_2_secs            =  5;

ReadMode ($raw_mode);

my $key;
my $cnt = 0;

while (not defined ($key = ReadKey($non_blocked_read))) {
  print "non blocked read returned nothing (" . ++$cnt . ")\n";
}

print "You pressed $key\n";

$key = ReadKey($normal_read_using_getc);

print "You pressed $key\n";


$key = ReadKey($wait_2_secs);
print "You pressed $key\n";

# Not available on windows
#
# print "Now, enter a line\n";
# my $line = ReadLine 0;
# print "The line is: $line\n";
Github repository PerlModules, path: /Term/ReadKey/script.pl
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741108257, '3.139.81.114', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Term/ReadKey/index(71): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78