What I am trying to do is create a task where participants will need to type in a word they see in psychopy. This is easily done, however, what I need is to record each key they input, and the timing of each key when they input it. This I want recorded to a excel file like any other data recording.
I’m working on something like that at the moment for a student.
For a simple word you could use:
Begin Routine
msg = ''
Each Frame
if key_resp.keys:
if len(key_resp.keys[-1]) == 1:
msg += key_resp.keys[-1]
elif 'return' in key_resp.keys:
continueRoutine = False
Try this with a text component showing $msg every frame and a keyboard component that doesn’t end the routine saving all keys.
Thank you. This works, however, in the excel spreadsheet, there is no data for each individual key and when it was pressed, just button press as a whole. Is this possible to have data for each key, of the time each one was pressed?
Is your keyboard response saving all keys? You should see a list of keys pressed and times pressed in the data file.
I have checked the log rather than the excel file, and it is saving all the keys pressed in there. I am guessing this is correct and I was just looking at the wrong data file.