I want my experiment to have a key-combination to serve as an indicator to elicit an initiated exit from the experiment.
Now I have this code, which detects a single key press:
while(1)
[keyIsDown,~,keyCode]=KbCheck;
if keyIsDown
if keyCode(SOME_KEY)
exitExperiment();
end
break;
end
end
I wish that SOME_KEY
would refer to a key combination, like ctrl+r
or shift+ESC
. Any other solution that will allow to refer to a combination of key presses will surely help.
Thanks.