Non-blocking keyboard peek
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Thu Oct 2 11:44:43 EDT 2003
"Adrian May" <adrian.may at web.de> writes:
> Therefore I need a non-blocking keyboard peek function.
> So far, my searching only lead to some stuff about using threads
> in GHC but that seems far too complicated and messy.
Look in the standard IO library for 'hReady', which is a non-blocking
check for input on a Handle. (You will also need to ensure that the
Handle/terminal is set to NoBuffering, etc.)
Regards,
Malcolm
More information about the Haskell-Cafe
mailing list