Mail Archives: djgpp/2000/06/25/14:05:56
> 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 -