Blitz (136/172)

From:Nick Clover
Date:27 Sep 2000 at 19:32:01
Subject:Re: EventCodes and Keys

Hello Gareth

On 27-Sep-00, you 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?

Just use something like:

repeat
ev.l=waitevent
keycode.s=ASC(inkey$)
WaitTOF_
until ev=$400

Regards






Nick Clover - http://i.am/bauk



A4000/060, 80Mb, PicassoIV, Paloma, KTX 17" Monitor, Punchinello II

IDE: 10.1Gb, 6.4Gb, LS120, DVD CD SCSI: CDD2600 CDR, Aiwa ACD300

Brother HL1250 Laser, HP890C Inkjet, Trust V90 & Ergo Keyboard


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