In case it is not possible to have MediaLab accept key press input from a custom item written in JavaScript (see my previous post: Custom Items: OnKeyPress Allowed?), I have been trying to come up with an alternative method using DirectRT. My goal is to present a sequence of images through which participants can go back and forth until they choose the one they think is correct. I want them to use keys to control the image presentation because I am trying to ensure that they use their left hand in one condition and their right hand in another. This alternative method does not produce as smooth a transition between images as the JavaScript custom item would because of the DirectRT load time, but I guess I may have to live with that. I can get the DirectRT program to move forward and backward in the sequence of images (here using the F key (33) and D key (32)), but for some reason if one tries to use the D key (32) on the very first image in trial 2 below, the screen just goes black, even though 32 is not an acceptable response for that trial. Any solution to this would be much appreciated. Thanks!
From trials 1 through 6:
Code:
~Please use left hand. 0,.3,1 0 ~Place index and middle fingers on F and D keys. 0,.5,0 0 ~Press spacebar when ready to begin. 0,.7,0 rt:57 *
muglefttiltleft30 0,0,1 rt:57<100,33<3 *
muglefttiltleft27 0,0,1 rt:57<100,33<4,32<2 *
muglefttiltleft24 0,0,1 rt:57<100,33<5,32<3 *
muglefttiltleft21 0,0,1 rt:57<100,33<6,32<4 *
muglefttiltleft18 0,0,1 rt:57<100,33<7,32<5 *