Mail Archives: djgpp/1997/02/13/14:42:21
Christian Tamasiu (tamasiu AT informatik DOT tu-muenchen DOT de) wrote:
: 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).
: Why is this? Any fix?
Sadly, this is a problem with the way keyboards are scanned in the
hardware. You can reliably detect one or two keys being pressed,
but not all three-key combinations work, and very few combinations
of more.
AFAIK the only 'solution' is to try to find a set of keys which
don't 'clash'. Since different keyboards clash in different places,
you really need to let the user redefine the keys; this isn't very
difficult really.
I don't think there's any way to check for key clashes other than to
try them and see. You could make your keyboard redefiner ask the
player to hold down various key combinations after defining the keys,
to check they're okay.
Of course, I may be completely wrong; if there is a neat and tidy way
to check for key clashes I'd love to hear it.
George Foot
I hate vi.
- Raw text -