Is there a way from inside Lua to check whether any key has
been pressed? io.read() will get a line from the console but if there is
no input it pends waiting for input. I would like to be able to write a
test that gets input if any is ready but would continue if there is none.
It is not obvious to me if this can be done at all.