How to make sure that two keys are pressed simultaneously before beginning each trial
I have a stroop like experiment that I would like to do, where I measure the reaction time.
A trial would go like this. I have a response box in front of the participants. It has four buttons. Two next to each other in the middle and one at the top and one at the bottom. At the beginning of each trial the participant has the two middle keys pressed and when they are shown the stimulus they have to decide if they need to press the top or buttom key. Then they release either the top or bottom key and press the respective one. After they press the key, the screen turns white until the next trial starts with a fixation point.
I can't seem to successfully put in a press event before the trial because it doesn't register if you have already pressed the buttons during the blank screen.
So my questions is whether there is a function that detects if or which keys are currently being pressed or if there is a different way to achieve that function.
I would be glad for some ideas/help. Thank you.