delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/21/06:26:58

From: jakobs AT ldv01 DOT Uni-Trier DOT DE (Oliver Jakobs)
Subject: Keycode error with Event.key (libgrx)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 21 Jul 1994 11:50:52 +0200 (MSZ)

Hello everybody,

   after using a newer version of the libgrx, I noticed a malfunction
in a procedure which tests for the cursor keys and home/end/PgUp/PgDown.
The keycodes which are received by MouseGetEvent do not match with
the definition in keys.h, being about 256 too large.

   Checking the libgrx-sources, I traced it down to the getxkey()-call,
which adds 0x100 if a register has a certain value. The code is a bit
confusing to me, using an interrupt call and #ifdef USE_AT_BIOS for
distinguishing between certain necessary calculations. After I added
a line to my function which subtracts 256 if the keycode is too large,
it works as before.

Is this an error in the library, the header file or had the wrong #define
been set while making the library? And, has anybody else noticed that too?

So long,

	Oliver

----------------------------------------------------------------------------
Oliver Jakobs                    |  Wisdom is one of the few things that
Computerlinguistik Uni Trier     |  looks bigger the further away it is.
jakobs AT ldv01 DOT Uni-Trier DOT de        |                           Terry Pratchett
----------------------------------------------------------------------------


- Raw text -


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