This is a bit of a selfish post, but since list traffic is low right
now, here goes.
 
I'm developing a routine that essentially loops looking for keyboard
input. If it has any, it processes the key otherwise it performs some
other (short) processes and loops around again to check for keyboard
input.
 
I've been writing a routine that uses Win32::Console in the manner shown
below.

Anyway, writing this has become way complex, and I've lost my way. I'm
wondering if anyone out there has some example code that they would be
willing to share?

Barry Brevik
=================================================
my $STDIN = new Win32::Console(STD_INPUT_HANDLE);
$STDIN->Mode(ENABLE_PROCESSED_INPUT);
 
while (1)
{
  # Read keyboard event.
  my @input = $STDIN->Input();
  if (defined $input[0] and $input[0] == 1)
  {
    <key processing happens>
  }

  <now other processing happens>
}

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to