Mail Archives: djgpp/1997/02/16/02:40:43
George Foot (gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk) writes:
> Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote:
>
>
> : I have allegro 2.1. I noticed there's a KEY const for numpad 5 but not for
> : other numpad keys, such as 7,8,9,4,6,1,2, and 3.
>
> 7 = Home, 8 = Up, 9 = PgUp, etc...
>
> I believe this actually depends on the Numlock state, though... try it and
> see (scan all numbers i from 0 to 127, checking the values of key[i], then
> try holding down a few keys). I think readkey() returns unique values for
> every key on the keyboard, presumably including the Alt keys.
k
That's what I thought. It's a 101 key keyboard and a char can hold 256
distinct numbers, more than twice that. Even if only the first 128 are
actually used that's enough to detect each key. But the KEY #defines in
allegro.h only go up to ninety-something or so...
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -