Mail Archives: djgpp/1997/02/13/21:15:53
Christian Tamasiu writes:
>While Allegro will detect the combination KEY_UP, KEY_RIGHT and KEY_SPACE, while
>the combination KEY_UP, KEY_LEFT and KEY_SPACE doesn't work (Allegro just
>detects that 2 of the 3 keys are pressed).
This is a flaw in the design of the PC keyboard. I don't know all the
details, but it uses some sort of grid system to detect presses, which
breaks down if more than two or three keys are held down at a time.
Interrupts are never generated for any additional keys, so there is no
way they can be detected. Exactly how many you can detect depends on
which keys they are, and on the model of keyboard being used. For this
reason, most multiplayer games have an option to reconfigure the
keyboard so the user can choose combinations that work on their machine.
/*
* Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
* Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
*/
- Raw text -