![]() ![]() I can't seem to figure out how this can be achieved. 1 Answer Sorted by: 1 I think this query solves your issue: PsychoPy Key Down Code using ioHub rating.markerPlacedAt is what you need to update every frame. That is, if the keyboard input is received in screen 1 itself (before the end of 0.5s), I want the input to be registered and the program to move on to the next stimulus (either by moving to screen 2 for a very short duration of time, or by skipping screen 2 all together). Instead, I want the program to go to the next stimulus whenever a keyboard input is presented between the start of screen 1 to the end of screen 2. The program only moves forward if a key entry is received for the second screen. The problem which I'm running into here is that, if the keyboard input has been received before the wait time of 0.5 ends in the first screen, events.waitKeys() doesn't register this key entry and still waits on the second screen for the keyboard input. ![]() for i in range (1, 21):Īnswer = cf.Stimulus() #This is a function for generating the stimulusįixation.draw() #This is the second screen PsychoPy using KeyList to set up an experiment. from psychopy import visual, core, event win visual.Window ( 1024, 768, fullscr False, allowGUI True, units pix, color (-1, -1, -1)) create just once: tstim visual.TextStim (win, text blah, pos (0,0)) correctkeypressed False for number in 0, 1, 2, 3, 4, 5, 6, 7, 8, 9: tstim. I'm using event.waitKeys() in order to get Keyboard input. What is PsychoPy, how do you show stimuli, and how do you get input from subjectsIf you need of help with PsychoPy, I am available for consulting and progra. I'm setting up an experiment on psychopy in which a stimulus is displayed on the screen for a set period of time (say 0.5s), after which a blank screen is presented with a fixation. Find keyboard.py file in your psychopy installation directory. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |