www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/16/02:50:07

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro: missing KEYs?
Date: 16 Feb 1997 05:49:09 GMT
Organization: Oxford University
Lines: 20
Message-ID: <5e674l$4bd@news.ox.ac.uk>
References: <5e3iri$lme AT freenet-news DOT carleton DOT ca> <5e3v58$3dg AT news DOT ox DOT ac DOT uk> <5e64gn$slh AT freenet-news DOT carleton DOT ca>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019