If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Win10 PsychoPy version (e.g. 1.84.x): v2022.2.4 Standard Standalone? (y/n) If not then what?:y What are you trying to achieve?:
I could control the slider markposition with the following code: https://discourse.psychopy.org/t/controlling-slider-with-keyboard/22317
but when I want to confirm the rating number,I fail by using the keyboard like “space” untill I click it.
How to use “space” to get the rating response instead of clicking?
Many thanks for your help!
Hi @wakecarter
Thank you so much for your reply!
I have tried to add the code below,the ‘Space’ got response,but the data couldn’t record it.Just like the following photo.
Hi,
Thanks again for your prompt reply!
I have tried to add the code like yours,just name ‘Rating’ thisExp.addData(’Rating’,slider.markerPos)
However,I couldn’t get ‘slider.rt’ unless I click it with mouse.
Is there any way to get RT by pressing my ‘space’?
Thank you very much!
The variable t is the time from the start of the routine. You could save it to the data file in End Routine or (slightly more accurately) within the Each Frame code where you are ending the routine.