MATLAB Answers

0

Psychtoolbox ignores keypress to go to the next step

Asked by Clarissa Lustig on 2 Jul 2019
Hello everybody,
I have a problem with the recognizing of keypresses in programms using the Psychtoolbox: The following code should show a black screen until any key is pressed. However, it doesn't notice the keypress and stays within the black screen. I have to interrupt the programm by using the task manager. I tried it with a code of a tutorial and on several computers. But it never worked. Does anyone have an idea what goes wrong?
cd C:\Matlab;
clear all;
close all;
[x,rect]=Screen('OpenWindow',0,0);
[center(1), center(2)] = RectCenter(rect);
Priority(MaxPriority(x));
HideCursor();
Screen('DrawText',x,'Press any key to begin',center(1)-100,center(2)-10,255);
Screen('Flip',x);
pause();
Screen('Flip',x);
WaitSecs(1);
Screen('Close', x)
Priority(0);
ShowCursor();
Thank you!

  0 Comments

Sign in to comment.

0 Answers