Heres a program to find the scan code faster or just use this code
sync on
do
sync
cls
text 0,0,"The scan code for "+inkey$()+" is "+str$(scancode())
loop
now after you find the scan code this is how use use keystate
rem keystate example for a
rem this loop keeps this program from exiting only way to exit is esc key
do
rem the scan code is 30 for a so if a is pressed keystate = 1 and condition is read...
if keystate(30) = 1
rem your condition here
print "hi"
endif
loop
rem this is the end of the loop
Windows Is better than everything