delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/19/19:45:32

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Keyboard
Date: 19 Jun 1998 02:55:43 GMT
Organization: Oxford University, England
Lines: 37
Message-ID: <6mcjvf$isj$1@news.ox.ac.uk>
References: <018f01bd9a07$2d6feb80$9a4d08c3 AT arthur>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Wed, 17 Jun 1998 16:46:59 +0100 in comp.os.msdos.djgpp Arthur
<arfa AT clara DOT net> wrote:

: >: Can anyone tell me how to patch the keyboard a la Allegro? I would like
: an
: >: array or bitfield of, say, 128 elements which would show which keys were
: >: pressed at which time.
: >
: >"at which time" or "at the time you test them"?  The latter is
: >simpler.

: Yes, sorry. My grammar is inexcusible. I also apologise for the "a la" which
: should have accents, and in my original posting I used the word "librarys"
: which should, of course, read "libraries."

I wasn't correcting your grammar!  I was just asking; it is perfectly
possible (and very useful) to store key presses and releases as
timestamped events (which is what I would suggest if you had meant "at
which time").  It's more complicated because you also need some way of
timing the events which works inside an interrupt handler; I'd
probably set up a timer handler too, increasing a counter, and add an
event to an event queue timestamped with the counter value.

: I have absolutely no qualms about looking over other people's code, so long
: as I understand it. But Allegro's routines hardly give a step-by-step
: walkthrough, do they?

Have you looked at them?  Most of the code is pretty well commented;
if it's not commented then it's usually self-explanatory.  The
keyboard handler function is easy to follow if you know roughly what
to expect -- hopefully my description I sent earlier should let you
know this.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

xu do tavla fo la lojban  --  http://xiron.pc.helsinki.fi/lojban/lojban.html

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019