Mail Archives: djgpp/1997/02/16/02:50:07
Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote:
: 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...
Yes; that's not Allegro's fault, that's just the way the keyboard scan codes
work. I think 89 is the highest, and some are missed out on the way (this might
just be on my UK keyboard, though). It's been a while, but I wrote my own
keyboard handlers before I started using Allegro, and I seem to remember
something odd about the NumLock state... the keypad definitely has the same
scancodes as the insert, delete, home, end, up, down, etc. keys in some state,
though.
You could make your own header, #defining KEY_PAD_7 to be KEY_HOME, or whatever.
--
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.
- Raw text -