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

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro: missing KEYs?
Date: 16 Feb 1997 05:04:23 GMT
Organization: The National Capital FreeNet
Lines: 25
Message-ID: <5e64gn$slh@freenet-news.carleton.ca>
References: <5e3iri$lme AT freenet-news DOT carleton DOT ca> <5e3v58$3dg AT news DOT ox DOT ac DOT uk>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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