PDA

Click to See Complete Forum and Search --> : QBASIC - KEYBOARD CODES


Kersey
Aug 10th, 2000, 10:40 AM
hello,

does anyone know how to read the keyboard buffer/ or keyboard scan codes with Qbasic.


why ?

I want to read different paralel inputs from a inputdevice ( cheap solutions only so i'am tring the keyboard at the moment)

other tips on i/o interface & sample code welcome !

Koralt
Aug 17th, 2000, 12:53 AM
I assume you don't *really* want to read the keyboard buffer ... if you do, you want to use INKEY$ .

For example:

<tt>
DO
PRINT INKEY$;
LOOP
</tt>

INKEY$ returns null ( "" ) if there's nothing on the buffer. The buffer limit is (iirc) 13. The following clears the buffer:

FOR T = 1 TO 15
a$ = INKEY$
NEXT T