Quitting a loop by pressing 'q'

You could run it as a async task, some similar questions here Keyboard input monitoring - #6 by cjdoris, How to Detect Key Down Events? - #2 by albheim

4 Likes