QBasic Tutorial 34 - Moving an Object With Arrow Keys - QB64


This tutorial will modify the code used within Tutorial 33.

To use the arrow keys, we need to know the PC Keyboard Scan Codes for keyboard arrow keys.

Up Arrow - CHR$(0) + CHR$(72)
Down Arrow - CHR$(0) + CHR$(80)
Right Arrow - CHR$(0) + CHR$(77)
Left Arrow - CHR$(0) + CHR$(75)

Code Download
QBT34.BAS



QBasic / QB64 Links

QB64 is a free download at www.qb64.com

QB64 Wiki & Manual is found at qb64.com/wiki.html

QBasic 1.1 comes with OldDOS. A zip file of OldDOS can be found at www.pcxt-micro.com/download.html

QBasic 1.1 needs DOSBox to run on Windows Vista and greater, Mac, and Linux.
DosBox is a free download at www.dosbox.com

Free QB64/QBasic Code

QBasic.Net - www.qbasic.net

Pete's QBasic Site - www.petesqbsite.com/index.php

QB45 - qb45.org

Phatcode - games.phatcode.net