From the Acorn BBC User Guide:
The INKEY$ function on a ZX81 takes whatever key (if any) that was detected during the last scan (a scan of the keyboard takes place every time the computer redraws the video picture). It then immediately moves onto the next BASIC line to execute.BBC User Guide wrote:GET
GET$
INKEY
INKEY$
The GET and GET$ functions wait until a key is pressed whereas the INKEY and INKEY$ pair give up after a while if no key is pressed.
100 A$ = GET$
will wait (for ever) until a key is pressed whereas
100 A$ = INKEY$(200)
will wait for only 2 seconds (200 hundredths of a second). If no key is pressed within 2 seconds then the computer will move on to the next line of the program and A$ will be empty. If a key was pressed after say one second then the computer will immediately move on to the next line of the program and will put the “character typed” into A$.
In the ZX81 manual it suggests:
10 PAUSE n
20 POKE 16437,255
30 PRINT INKEY$
Where n in line 10 is whatever time you want to wait for.
Line 20 is to overcome a ROM bug that is present in some ROM versions. If the program runs without it on your machine, you can leave it out.
Although, in a game, pausing wastes vital computing time. So it’s not practical to pause for any significant length of time.
Mark