Wait until M1 key pressed
key 30, "m"
private waitM1$
waitM1:
wait 0,&h01 ' wait for key press
waitM1$ = inkey$ ' read key data for key pressed
if waitM1$ <> "m" then ' if key not M1
goto waitM1 ' wait for next key press
endif
print "M1"
Wait until M2 key pressed
key 31, "n"
private waitM2$
waitM2:
wait 0,&h01 ' wait for key press
waitM2$ = inkey$ ' read key data for key pressed
if waitM2$ <> "n" then ' if key not M2
goto waitM2 ' wait for next key press
endif
print "M2"
|