Menu

Keyboard Values

2007-03-21
2013-04-04
  • SuperNatendo

    SuperNatendo - 2007-03-21

    I am posting this program, I use it to find out the value of the keys on the keyboard used by BASIC-256:

    rem This program waits for the user to press a key on the keyboard.  When a key is pressed it displays the numerical value that BASIC-256 assigns to that key.  This is useul for programs that use the keyboard for user input to move graphics on the screen.

    getkeyloop:
    x = key
    if x = 0 then goto label     rem keeps program from displaying 0 when not pressing any keys
    cls                          rem clears text so only the key that was pressed last is displayed
    print x                     
    goto getkeyloop

     
    • drblast

      drblast - 2007-03-23

      Thank you for this.

      I saw in another thread that you posted a portion of a tutorial.  If you're still working on it, you can email it to me at drblast@users.sourceforge.net when you're finished, and I'll post it or incorporate it into a future tutorial.

       

Log in to post a comment.