From: kunst AT prl DOT philips DOT nl Subject: Re: getch without echo? To: fb33 AT rummelplatz DOT uni-mannheim DOT de (Christoph Kuhmuench) Date: Thu, 28 Oct 1993 10:06:05 +0100 (MET) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list) > > I'd like to read characters from the keyboard without waiting for > or if possible without waiting at all. The pressed key shouldn't be echoed > to the screen (like getche() in Turbo) > #include This include file defines a.o. the prototypes for the following functions: int kbhit(void); int getkey(void); /* ALT's have 0x100 set, 0xe0 sets 0x200 */ int getxkey(void); /* ALT's have 0x100 set */ getkey() does what you want, getxkey() is for reading extended keys. Read the comments in for further details. If you don't want to wait, use something like: int c = kbhit() ? getkey() : -1; /* never waits */ Pieter.