coroutines and pending keypresses problem
I have encountered the problem with using coroutines. If I want to use keyboard response (in go/nogo task) in coroutine,
pending keypresses don't get flushed. They are being carried over to the next trial, so a person who button-mashes "responds" to a number of trials consequently. Is there any solution for that? Maybe some inline script? Any help will be greatly appreciated.
I attach my experiment.