while 1
ch = GetChar
KbWait
if (ch>48) && (ch<53)
trial(j).RT = GetSecs - startTime ;
break;
end
end
here is my sample code, I am working on an Stroop Task, I am expecting to gatjer reaction time. Reaction time starts with stimulus presentation and end with key press. I use the code above to supress whole keyboard expect the numbers of 1-2-3-4. however, sometimes all keys can be pressed rather than just 1-2-3-4. I hav tried many times, it some times supresses keys sometimes it doesn't. I really do not understand the reason.