Date: Wed, 28 Dec 1994 14:34:31 -0500 From: mtaylor@gateway.cybernet.com (Mark J. Taylor) To: John Beukema <jbeukema@HK.Super.NET>, freebsd-hackers@freefall.cdrom.com Subject: Re: how to emulate kdhit()B? Message-ID: <v01510112ab276d70c7f2@[192.245.33.12]>
next in thread | raw e-mail | index | archive | help
At 5:24 PM 12/28/94, John Beukema wrote: >I cannot get the function kbhit() which works well under SCO to work under >FBSD. The function which tries to read 1 char from stdin after setting >flags to nonblocking, always returns true ie, keyboard hit when the term >is in 'cooked' mode. Can anyone point me to a way to do this? >jbeukema Have you tried using fileno(stdin) in a select() call with an immediate return (when times=0)? It should do the trick of emulating kbhit(). -Mark Taylor mtaylor@cybernet.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01510112ab276d70c7f2>