Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mitel!sce!cognos!alzabo!tris From: tris@alzabo.uucp (Tris Orendorff) Newsgroups: comp.lang.c Subject: Re: Keypressed exists? Message-ID: <1990Feb10.190053.15413@alzabo.uucp> Date: 10 Feb 90 19:00:53 GMT References: Distribution: comp Lines: 18 ron@clarity.Princeton.EDU (Ronald Beekelaar) writes: >Hi > I have a very simple question, although I can't find the answer myself. How >do you quietly test whether any key was pressed on the keyboard? I want to >write a function that waits 10 seconds, if any key had been pressed, but >doesn't wait at all, if none was pressed. In Microsoft C V5.1 you can use the functions kbhit () and getch (). See section 4.8.3 in the run-time library reference book. -- Sincerely Yours Tris Orendorff tris@alzabo.uucp -----------------------------------------------------------------------