www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/15:13:26

Message-Id: <m0vwTPW-000S1oC@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT natacha DOT inti DOT edu DOT ar>
Organization: INTI
To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire), djgpp AT delorie DOT com
Date: Mon, 17 Feb 1997 16:59:23 +0000
MIME-Version: 1.0
Subject: Re: Allegro: missing KEYs?

Hi

> 
> 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...

  The keyboard can't report an scan code over than 128 because the bit 7 have an 
special meaning, so a code for a key from the keyboard must be under 128.
As you have only 101 (or 102 or 105 keys) you'll get only this, plus some 
extended codes that are a pre-code + a code, but even with that the number is 
under 128.

  And I saw a post about Ctrl+Break, I don't remmember well but if I do, this 
key isn't reported as just Ctrl + Break by the keyboard, have an special 
extended code. If somebody needs the exact answer just e-mail me and I'll 
search in my books, but now I'm too busy for searching just in case of ...

SET
--------------- 0 --------------------------------
Salvador Eduardo Tropea (SET).
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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