home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9331 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  993 b 

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
  2. From: kxb@matt.ksu.ksu.edu (Karl Buck)
  3. Newsgroups: comp.os.linux
  4. Subject: Polling keyboard in linux. What works best?
  5. Date: 29 Aug 1992 04:12:35 -0500
  6. Organization: Kansas State University
  7. Lines: 15
  8. Message-ID: <17nf23INNfr8@matt.ksu.ksu.edu>
  9. NNTP-Posting-Host: matt.ksu.ksu.edu
  10. Keywords: linux
  11.  
  12. I want to check the keyboard for input (using gcc of course) without
  13. actually reading (ie: getc etc..). The unix FAQ suggests looking at
  14. the FIONREAD ioctl or using select() and the C FAQ states that this is
  15. a purely OS dependant question.
  16.  
  17. What is best for Linux? Can this be non-blocking? A snippet of code
  18. for this would be great since I have not had to do this kind of thing
  19. before. Thanks.
  20.  
  21.  
  22. -- 
  23. Karl Buck             O, Freddled Gruntbuggly      
  24. USGMRL           Thy Nicturations are to me   
  25. 913.537.6106 (H)    As Plurdled Gabbleblotchits  
  26. 913.776.2745 (W)    On a lurgid bee.       -- Chief Prostetnic Vogon Jeltz
  27.