Mail Archives: djgpp/1995/12/23/03:17:22
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:4009
|
Path: | news-dnh.mv.net!mv!barney.gvi.net!news.sprintlink.net!micro.internexus.net!micro.internexus.net!master
|
From: | master AT micro DOT internexus DOT net (Laszlo Vecsey)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Help with keyboard polling
|
Date: | 21 Dec 1995 20:32:04 GMT
|
Organization: | The Internet Nexus
|
Lines: | 19
|
Message-ID: | <4bcg84$1bn@micro.internexus.net>
|
References: | <DJu4w5 DOT 35n AT jade DOT mv DOT net>
|
NNTP-Posting-Host: | micro.internexus.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote:
: On Mon, 18 Dec 1995, Isaac Kohn wrote:
: > All of the keyboard i/o routines in DJGPP (getkey(), getxkey(), getchar(),
: > etc.) wait for a keypress when they are called. How do I query in order to
: > retuen a key if one has been pressed, or 0 if not? In other words, I'm
: Use kbhit().
I think what the original poster meant by the question was if there was a
char keys[256]; array that DJGPP keep for all the ASCII characters ...
keys that are currently being pressed down would have a 1 in the array,
otherwise they would be 0. As you know a scan code is received when a key
is pressed, and also when it is released.
The kbhit() that I'm familiar with doesn't work in this way... it just
checks if there is a character in the keyboard buffer.
- Raw text -