From: Walton Roth on
I am using a 'timer' to give sound stimuli and want to look for mouse clicks in response. Sometimes no mouse click is given and I want ginput to time out or to cancelled in some way, so that I can store the data and exit from the program. ginput(0) allows continuous acquisition of cursor position but not of button presses. Timers that deliver 'retrurn' to the loop in which ginput occur, do not stop it. Any suggestions?