[open] Only displaying a stimulus while a key is pressed, and logging how long that key is pressed
Hey all,
So the title hopefully explains what I'm trying to do...
I currently have a simple response time experiment which gives me the time between presentation of stimulus and a keyboard press. The stimulus is presented when a key is pressed after a fixation delay but I would like the stimulus to be presented when a start button is held down, BUT only while the start button is held down.
And I would like the logger to record how long the start button was held for.
Any ideas?
Thanks in advance!
Adam

Comments
Hi Adam,
Key releases are not supported by the
keyboard_responseitem, but you can collect key releases using a little bit of Python scripting. You'll probably want to take a look at these discussions:There you will find the general idea. If you have trouble applying this to your specific case, please don't hesitate to post a question.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thanks for directing me to these discussions! I am absolutely code/script illiterate but I'll be showing these discussions and my experiment to a CompSci friend this evening and I'll let you know how we get on.
Cheers
Adam