Subject: Re: raw input (keyboard) in msdos-perl?
From: [email-masked] (Dan Carson)
Date: Mon, 28 Sep 1992 17:22:09 GMT
Newsgroups: comp.lang.perl

In article <kebsch.716737968@neurotic> [email-masked] (Waldemar Kebsch) writes:
>
>Hi,
>
>how I can enable raw input (keyboard) in msdos-perl? I wish to get the key,
>when it is pressed and not when the enter-key is pressed.

Looking at Ralf Brown's interrupt list and msdos.c in the perl distribution,
plus some trial and error, I came up with these subroutines:

sub raw { ioctl(STDIN,1,0xd3 | 0x20); }  # Bit 5 is the "raw" bit
sub unraw { ioctl(STDIN,1,0xd3); }       # 0xd3 is a "sane" value

This would be a good item for the FAQ list.

Dan Carson
[email-masked]
John Fluke Mfg.
Everett, WA