Blitz (137/172)

From:Dan Arico
Date:27 Sep 2000 at 17:33:12
Subject:Re: EventCodes and Keys

On 27-Sep-00, Gareth Griffiths wrote:
> Hello,
>
> This is probably really obvious, but when I'm scanning for a
> keypress event (IDCMP $400) in a loop, and it detects one, how do I
> get the ASCII code of that character?
>
> I've tried EventCode, and it just returns the decimal equivalent of
> the rawkey codes in the back of the manual. Short of creating a
> lookup table, is there any way of getting the ASCII equivalent of
> this rawkey code?

Set up an array of ASCII codes and use the key value as an index.
You'll have something like this:

ASCII = keyarray[keycode]

Dan Arico



"Liberty lies in the hearts of men and women; when it dies there, no
constitution, no law, no court can save it."
-- Learned Hand - (American jurist - 1944)

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie