how to poll keyboard
John F. Haugh II
jfh at rpp386.UUCP
Fri Aug 5 23:24:49 AEST 1988
In article <5065 at husc6.harvard.edu> nakada at husc8.UUCP (Paul Nakada) writes:
>
>I am in need of a way to read a terminal keyboard without
>stopping if there is no keypress...
open the file with O_NDELAY. or, you can use the VTIME/VMIN feature and
try a few different values. there is, however, no way to tell (in general)
if a key is _currently_ being pressed.
--
John F. Haugh II +--------- Cute Chocolate Quote ---------
HASA, "S" Division | "USENET should not be confused with
UUCP: killer!rpp386!jfh | something that matters, like CHOCOLATE"
DOMAIN: jfh at rpp386.uucp | -- apologizes to Dennis O'Connor
More information about the Comp.unix.questions
mailing list