login
Header Space

 
 

Polling keyboard in linux. What works best?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Saturday, August 29, 1992 - 5:12 am

I want to check the keyboard for input (using gcc of course) without
actually reading (ie: getc etc..). The unix FAQ suggests looking at
the FIONREAD ioctl or using select() and the C FAQ states that this is
a purely OS dependant question.

What is best for Linux? Can this be non-blocking? A snippet of code
for this would be great since I have not had to do this kind of thing
before. Thanks.


-- 
Karl Buck               O, Freddled Gruntbuggly      
USGMRL                  Thy Nicturations are to me   
913.537.6106 (H)        As Plurdled Gabbleblotchits  
913.776.2745 (W)        On a lurgid bee.       -- Chief Prostetnic Vogon Jeltz
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Polling keyboard in linux. What works best?, Karl Buck, (Sat Aug 29, 5:12 am)
speck-geostationary