Subject: RE: GNUWIN32 Question
From: [email-masked] (Mark Levine)

4 Jul 1997 09:07:48 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Light Version 3.0.1 (32)
Original-To: [email-masked]
In-Reply-To: <[email-masked]>
Original-Sender: [email-masked]

I am able to run the following code segment to detect when a key is
pressed.  This function seems to return a 0 if a key is not pressed with
the time period, and a 1 if a key is pressed.

What I cant seem to get working is to how to figure out which key was pressed.

Can anyone offer any tips?

Thank you in advance.

At 10:00 97/06/11 +0400, you wrote:
>Robert wrote:
>> <<File: ATT00000.att>>
>> I love your product, I just need one thing. A kbhit() function. The 
>
>#include <sys/socket.h>
>#include <sys/time.h>
>
>int kbhit()
>{
>	FD_SET rfds;
>	struct timeval tv;
>
>	FD_ZERO(&rfds);
>	FD_SET(0, &rfds);
>	tv.tv_sec = 0;
>	tv.tv_usec = 0;
>	select(1, &rfds, 0, 0, &tv);
>	return(FD_ISSET(0, &rfds);
>}
>
>
>-- 
>Sergey Okhapkin
>Moscow, Russia
>Looking for a job.
>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"[email-masked]" with one line of text: "help".
>
>

************************************************************************
*                                                                      *
*                     Visit Our Web Page at:                           *
*               http://www.tiac.net/users/dynasens                     *
*                                                                      *
*----------------------------------------------------------------------*
*                               |                                      *
* Mark Levine                   | EMAIL: [email-masked]             *
* DynaSense Consulting Services |                                      *
* Framingham, MA 01701          |                                      *
*                               |                                      *
************************************************************************

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".