console.keyhit readonly

The console.keyhit property checks if a key has been pressed, returning true or false otherwise.

Example

--! luart-extensions import console print("Waiting for a key press...") while not console.keyhit do sleep() end