www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/25/14:05:56

Message-Id: <200006251811.XAA02493@midpec.com>
From: Prashant TR <tr AT midpec DOT com>
Date: Sun, 25 Jun 2000 22:50:16 +0530
To: djgpp AT delorie DOT com
Subject: Re: Commande boiskey
Reply-To: djgpp AT delorie DOT com

> In a small program, I try to make an object move by the left and right
> arrow keys.  I test them with bioskey().  The problem:  even after
> having released the cursor, the object continues to move in the
> direction of the first pressed key (even if I press the other way).  I
> had to understand that keypresses remain in the "keyboard buffer"
> but.....  What to make of this?

The best way to do this would be to hook interrupt 9 and make use of
the scancodes. Check the DJGPP FAQ on how to install an interrupt
handler.

If you aren't familiar with interrupt handling and want to use
bioskey(), you need to use the _bios_keybrd(_KEYBRD_READ) to get them
out of the keyboard buffer.

-- 
Prashant TR <tr AT midpec DOT com>
Web: http://www.midpec.com/

- Raw text -


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