Dear PsychoPy community,
Here a question that addresses especially those who have some experience with PsychoPy in ERP-experiments. We are using PsychoPy 1.79, Builder on a Windows 7, 64bit computer for stimulus presentation; this computer sends TTL pulses via the parallel port to an identical computer on which Brain Vision recorder software collects the EEG data.
We want to run a sentence processing experiment. With onset of each word of a sentences a TTL pulse is sent, providing the code for the first word (10), the second word (20) and so on. Since the experimental manipulation happens on the last word, at which semantic processing is manipulated, three levels of cloze probability are coded as 51, 52 or 53. Sending the TTL pulses for the stimuli works very well, however, we have some problems with the response trigger. Specifically, participants will have to push one of three buttons to indicated the level of cloze probability. We have managed to send a TTL pulse for the moment they have pushed the button using the $response.clock.getTime() variable for the definition of the start time for the parallel port to send our code. However, we are failing to send different codes for different keys pressed. All I want to do is to send for instance a 51 when the pressed the left button, a 52 when the pressed a down button or a 53 when they pressed the right button on the keyboard. I assume that I will add a little piece of Code that translates ‘left’ to 51 and so on.
But I cannot even find in the variable that indicates which key is pressed in the compiled version of our experiment. Has anyone a suggestion? Thanks in advance,
Sebastian