I am trying to detect when a key is depressed, while running in a continuous loop. It is essential that this process is non blocking, but so far I have tried about 4 different libraries or suggestions, and they are all blocking! Given how easily Go does some relatively complex things, it seems unbelievable how a seemingly simple task such as detecting when I press Q to quit is so difficult to do.
PS. Back in the 80’s my Commodore VIC-20 could achieve this using only 2 lines of code:
if K$ = “Q” then end