Greetings perl-win32-users,
I have tried everything I can think of to echo keypresses. Here is my
attempt to do it with Win32Console. I can get the key values and
everything else returned by input but I just can't figure out how to
echo the input. Sorry about the text formatting, my e-mail program
messes it up and will not allow me to change it.
use strict;
use Win32::Console;
my $console = Win32::Console->new(STD_INPUT_HANDLE);
my $return = $console-> Mode(ENABLE_ECHO_INPUT);
my $chars = 0;
my $string;
until ($chars eq "\r") {
my @list = $console->Input();
$chars = chr($list[5]);
$string .= $chars if($list[1] == 1);# only record down keys
# [0] event type 1 for kbd [1] key up or down? [2] repeat count
[3] keycode [4] scancode [5] ascii value [6] control key states ???
print "\n string is $string\n" if($list[1] == 1);
}
print "\nDONE";
exit;
--
Best regards,
Spencer_Lists Chase mailto:[EMAIL PROTECTED]
67550 Bell Springs Rd.
Garberville, CA 95542 Postal service only.
Laytonville, CA 95454 UPS only.
[EMAIL PROTECTED]
http://www.spencerserolls.com
http://www.spencerserolls.com/MidiValve.htm
(707) 984-8356
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs