Path: utzoo!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!abvax!iccgcc!browns From: browns@iccgcc.decnet.ab.com (Stan Brown) Newsgroups: comp.lang.c Subject: Re: getchar() Message-ID: <3693.27d8d46e@iccgcc.decnet.ab.com> Date: 9 Mar 91 17:26:21 GMT References: <1991Mar5.063644.8459@cs.mcgill.ca> <1991Mar5.220902.19196@ux1.cso.uiuc.edu> <1991Mar6.165835.10237@cs.mcgill.ca> Lines: 20 In article <1991Mar6.165835.10237@cs.mcgill.ca>, storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: > In article <1991Mar5.220902.19196@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes: >> >> Your problem is that getchar() does not recognize ANY input until >>you hit Enter. > > Then is there ANY way that I can have sort of "HOT KEYS" ie the user > just hits a key, and then the computer recognizes that a key has been hit > and the key is sent to some variable...? (Using MSDOS...) As several people have said, there's no portable way to do this. You don't say which compiler you're using. In Microsoft C, use _bios_keybrd or getch. I would imagine there's something similar in Turbo C. Is it appropriate to remind you to RTFM? My opinions are mine: I don't speak for any other person or company. email (until 91/4/30): browns@iccgcc.decnet.ab.com Stan Brown, Oak Road Systems, Cleveland, Ohio, USA +1 216 371 0043