I am having a hard time figuring out how the KbCheck function works and how I can use it to pause whatever my program is doing, wait for the spacebar to be pressed and then resume with the program.
KbCheck's documentations has this:
[keyIsDown, secs, keyCode, deltaSecs] = KbCheck([deviceNumber])
I know keyIsDown will constantly return 0 until the user presses any key, after which it will return 1. But, how do I use KbCheck with a while loop to do the above?