Keys

Shiping Zhang ping at cubmol.bio.columbia.edu
Fri Aug 17 12:59:21 AEST 1990


In article <1990Aug16.160043.20584 at eagle.lerc.nasa.gov> vvcns at mars.lerc.nasa.gov writes:
 
>     I was wondering if anybody knows how to make a program accept input
>from the keyboard without the user pressing the return key.  For example,
>if a user is asked a yes or no question and s/he types a y, the program
>will continue as if return was pressed.  I am working on a VAX/VMS system
>v5.1.  I would appreciate any help.

Have you ever tried to use ioctl()?
This function can be used to set the terminal into the "raw" mode.
With this mode, characters are readable immediately.

-ping



More information about the Comp.lang.c mailing list