devicefuture / atto

The new BASIC computer that runs in your browser!
https://atto.devicefuture.org
MIT License
47 stars 8 forks source link

Add getkey and readkey commands #23

Open pavlos256 opened 2 years ago

pavlos256 commented 2 years ago

This adds the getkey command that opens the door to games! I was surprised this isn't already built-in (although I did find the undocumented key variable).

Accompanying getkey is readkey, which is the same but will not block if there is no key waiting.