home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!quads!soh3
- From: soh3@quads.uchicago.edu (min-woong sohn)
- Subject: Re: getchar() without <enter> in emx gcc?
- Message-ID: <1992Nov21.183800.19415@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: soh3@midway.uchicago.edu
- Organization: University of Chicago
- References: <1992Nov21.154701.16804@grebyn.com>
- Distribution: usa
- Date: Sat, 21 Nov 1992 18:38:00 GMT
- Lines: 19
-
- In article <1992Nov21.154701.16804@grebyn.com> richk@grebyn.com (Richard Krehbiel) writes:
- >This is a very common FAQ in comp.lang.c, so I hate to ask....
- >
- >How do you read a single character from the keyboard without requiring
- >hitting ENTER, and without echo?
- >
-
- It's in the emx doc. You need to use _read_kbd() as follows:
-
- #include <stdlib.h>
- #define getch() _read_kbd(0,1,0)
- #define getche() _read_kbd(1,1,0)
-
- Now getch() will not echo the character and getche() will.
-
- Min
-
-
-
-