home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4615 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.2 KB  |  33 lines

  1. Newsgroups: comp.unix.programmer
  2. 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
  3. From: jrpg8255@uxa.cso.uiuc.edu (Jeremy Payne )
  4. Subject: checking stdin for keypress
  5. Message-ID: <BuDH4F.LFv@news.cso.uiuc.edu>
  6. Summary: How do I check for available keystrokes?
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Thu, 10 Sep 1992 17:12:13 GMT
  10. Keywords: keypress stdin
  11. Lines: 20
  12.  
  13.  
  14. I'm trying to port someone's PC-code, and just realized that I've never
  15. needed the unix equivalent of kbhit() before.  How does one check for 
  16. keystrokes in the buffer (how are they buffered?) without calling getchar() and
  17. having to wait for one?  I could include it in the X portion of the code but
  18. I'd really like to know how to do it w. stdin.  On a similar note, could 
  19. someone mention if and how scan codes etc. are generated for things like 
  20. function keys etc.?  A quick RTFM is fine :-) I've never used curses BTW if
  21. that turns out to be the answer ...
  22.  
  23. Thanks a bunch,
  24.  
  25.  
  26. ---------------------------
  27. Jeremy Payne
  28. UIUC Neuroscience program /
  29. College of Medicine
  30. jrpayne@uiuc.edu
  31. (217)244-4478
  32. ---------------------------
  33.