home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jrpg8255
- From: jrpg8255@uxa.cso.uiuc.edu (Jeremy Payne )
- Subject: checking stdin for keypress
- Message-ID: <BuDH4F.LFv@news.cso.uiuc.edu>
- Summary: How do I check for available keystrokes?
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Thu, 10 Sep 1992 17:12:13 GMT
- Keywords: keypress stdin
- Lines: 20
-
-
- I'm trying to port someone's PC-code, and just realized that I've never
- needed the unix equivalent of kbhit() before. How does one check for
- keystrokes in the buffer (how are they buffered?) without calling getchar() and
- having to wait for one? I could include it in the X portion of the code but
- I'd really like to know how to do it w. stdin. On a similar note, could
- someone mention if and how scan codes etc. are generated for things like
- function keys etc.? A quick RTFM is fine :-) I've never used curses BTW if
- that turns out to be the answer ...
-
- Thanks a bunch,
-
-
- ---------------------------
- Jeremy Payne
- UIUC Neuroscience program /
- College of Medicine
- jrpayne@uiuc.edu
- (217)244-4478
- ---------------------------
-