getchar()

Burkhard Kirste kirste at methan.chemie.fu-berlin.de
Thu Mar 7 22:03:45 AEST 1991


storm at cs.mcgill.ca (Marc WANDSCHNEIDER) 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...)
>
That's trivial in Turbo C (MSDOS):  i = getch();
It is much more complicated under UNIX, but possible.
-- 
  |~|   Freie Universitaet Berlin, Institut fuer Organische Chemie
  / \   Burkhard Kirste    kirste at kristall.chemie.fu-berlin.dbp.de
 /FUB\  Takustrasse 3, D-1000 Berlin 33      UUCP: kirste at fub.uucp
 `---'  Telefon: (030)838-6484              Telefax: (030)838-5163



More information about the Comp.lang.c mailing list