BBS: Inland Empire Archive
Date: 06-22-92 (02:43) Number: 1078
From: STEVE MATHIESON Refer#: NONE
To: BILL CAMPBELL Recvd: NO
Subj: key trapping Conf: (2) Quik_Bas
On Sunday June 21 1992, Bill Campbell wrote to Mike
Kruppenbacher, and it went something like this:
BC> I was messing with it as I went but I figgerred it would work. I put the
BC> trap in a loop and each time throught the loop it hits
BC> a "onkey (xx) gosub
BC> ...". Before the loop I turn the keys off and then
BC> turn on key (xx). Works
BC> just fine for the numeric arrows. The code (by the way) works for both
BC> sets of arrows in (shudder) GWBasic. So, again I
BC> plead, can anyone help me
BC> to get the stand-alone arrows to work? Thanks, Bill C.
Here's an example, although for some reason the dedicated
keypad keys don't work if the NumLock is on....
KEY 15, CHR$(128) + CHR$(75)
KEY 16, CHR$(128) + CHR$(72)
KEY 17, CHR$(128) + CHR$(77)
KEY 18, CHR$(128) + CHR$(80)
ON KEY(15) GOSUB dedicatedleft
ON KEY(16) GOSUB dedicatedup
ON KEY(17) GOSUB dedicatedright
ON KEY(18) GOSUB dedicateddown
ON KEY(11) GOSUB numericup
ON KEY(12) GOSUB numericleft
ON KEY(13) GOSUB numericright
ON KEY(14) GOSUB numericdown
DO: LOOP UNTIL INKEY$ = "q"
PRINT " Pressed LEFT on the DEDICATED Arrow Keys"
PRINT " Pressed RIGHT on DEDICATED Arrow keys"
PRINT " Pressed UP on DEDICATED Arrow Keys"
PRINT "Pressed DOWN on DEDICATED arrow Keys"
PRINT " Pressed LEFT on the NUMERIC Keypad "
PRINT " Pressed UP on NUMERIC pad"
PRINT " Pressed DOWN on NUMERIC"
PRINT "Pressed RIGHT on NUMERIC Pad"
Hope that helps....
--- GoldED 2.40
* Origin: Sam's Place (613)837-0413 Ottawa, ON Canada (1:163/319)