Response input from Matlab


I am using keyboard responses in Psychopy. I use Matlab to simulate a keyboard press “enter” which sends signals to Psychopy as if I pressed “enter” on keyboard.
Psychopy didn’t get the input from Matlab. Please advise what is wrong.


Hi @Yu_Zhi,

Could you please share more about how things are connected here? Without more detail it’s difficult to advise what is going on.



Hi Kimberley,

Thanks for response. Psychopy has mouse click and keypress response so we would like to make use of it to start a new trial in behavior task. I am using Matlab to simulate both mouse click and keypress to trigger the next trial on Psychopy.

currently, I used a new window instead of fullscreen on Psychopy and let Psychopy receive mouse click and keypress simulated from Matlab. As I need multiple trials to be triggered, I used loop in Matlab, but only the first loop could trigger Psychopy to move to a new trial but not the remaining loops.
could you please suggest if there is another solution? thanks. Please let me know if you need more info.

Yu Zhi