"keystate" uses a number instead of a string. The number associated with the key you want can be found out using the "scancode" command.
Or you can use a graphic I made (using another graphic as a reference) that shows the keystate of all the keys (it's attached to this message).
if keystate(30)=0 then dec velocity#,.01
With regards to the gravity you need to slowly decrease the velocity when no keys are pressed. Because in low gravity when you hit the truster you keep going for a bit even after you stop the thruster. The best way to do this is to add a "timer()" so it's not too fast (regardless of what computer it's on). You really only need one variable because "velocity" can be positive or negative.
Also you don't need to set the current directory if everything the code needs is in the same directory as the code (or .exe).
In the code snip I also added "upper$" to change "ch$" to uppercase... we use this so no matter what case the keyboard is in it will always be uppercase to check the keys pressed (a and A are two different characters). I took out "z" and "c" to just focus on the main problems you're having. I also made "velocity" an integer... it doesn't need to be a float because its made to increase/decrease by pixels. The screen coordinates are always whole numbers.
Rem Project: lander test
Rem Created: 3/4/2006 4:39:22 PM
Rem ***** Main Source File *****
`test lander
set display mode 1280,1024,32
load image "lander.bmp",1
sprite 1,500,500,1
velocity = -1
gravtime=timer()
burntime=timer()
movetime=timer()
do
ch$ = inkey$():ch$=upper$(ch$)
set cursor 20,20
print "Velocity = ",velocity
if ch$="A" then print " Thruster Burn"
` Move the lander every 200 milliseconds
if timer()>movetime+200
move sprite 1,velocity
movetime=timer()
endif
` Increase velocity if the A is held down every 500 milliseconds
if ch$="A" and timer()>burntime+500
inc velocity
` Limits the max upward velocity to 10
if velocity>10 then velocity=10
burntime=timer()
endif
` Decrease velocity if no keys are held every second
if ch$="" and timer()>gravtime+1000
dec velocity
` Limits the max downward velocity to -5
if velocity<-5 then velocity=-5
gravtime=timer()
endif
loop