Results 1 to 2 of 2

Thread: QBASIC - KEYBOARD CODES

  1. #1

    Thread Starter
    Lively Member Kersey's Avatar
    Join Date
    Jun 1999
    Location
    The Netherlands
    Posts
    101
    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 !





  2. #2
    Member
    Join Date
    Aug 2000
    Location
    USA
    Posts
    32
    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

    -Koralt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width