Xref: news-dnh.mv.net comp.os.msdos.djgpp:3981 Path: news-dnh.mv.net!mv!news.sprintlink.net!worldlinx.com!clio.trends.ca!io.org!van-bc!news.mindlink.net!agate!news.ucdavis.edu!wheel!elric From: elric AT wheel DOT ucdavis DOT edu (Jeffrey Taylor) Newsgroups: comp.os.msdos.djgpp Subject: Re: HELP! How do I query/poll keyb? Date: 20 Dec 1995 20:54:07 GMT Organization: Davis Community Network - Davis, California, USA Lines: 26 Message-ID: <4b9t5f$sob@mark.ucdavis.edu> References: NNTP-Posting-Host: wheel.dcn.davis.ca.us To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp #include if (kbhit() != 0) { c = getche(); /* or getch() for no echo */ You will need to all -lpc to the end of the link command line. Jeff Isaac Kohn (hacker1 AT ripco DOT com) wrote: : Greetings and salutations to you, my friends of culture, : I am writing a small program in C that needs to be able to poll or query the : keyboard, and all I've found (getkey(), getxkey(), getchar(), etc.) wait for : a keypress when called. I once had a compiler that had a procedure ci() : that would return the last key in the keyboard buffer, or 0 if one hadn't : been pressed. I need something like this. Thx much, : : Isaac K. : hacker1 AT rci DOT ripco DOT com : ivk AT hfnet DOT sinai DOT org -- ============================================ Without my guitar, I am a poet without arms. - Michael Bloomfield ============================================