OS (e.g. Win10): Mac OS Sierra 10.12.3
PsychoPy version (e.g. 1.84.x): 1.85.0
Standard Standalone? (y/n) Yes
What are you trying to achieve?: Trying to provide feedback based on a conjunction of space bar presses AND mouse click, but the mouse always records as pressed. In order to get a point, participants must click one of two images (doesn’t matter which) and an experimenter must press the space bar (though this will change depending on condition). All other iterations should not give a point (i.e. no space bar and no mouse, space bar but no mouse, mouse but no space bar). We don’t want to end the trial on click, and we don’t want the participant to get any points for not actually clicking one of the images. The participant will be using a bluetooth mouse and the experiment will be mirrored onto another monitor for them, the experimenter will be in control of the main computer and Psychopy program as well as the keyboard.
What did you try to make it work?: Tried using USB mouse as well as laptop mouse (experiment will be run using bluetooth mouse), same results for both. Ideally the code component should contain something like:
if mouse.getPressed() and key_resp_2.corr: msg="+1 Point" if not key_resp_2.keys: msg="0 Points else: msg="0 Points"
I’ve tried both mouse.getPressed and mouse.isPressedIn(image)/mouse.isPressedIn(image_2).
What specifically went wrong when you tried that?: Every iteration I can think of results in always giving one message or another, and often just falling through to the “else” statement. When I looked at mouse clicks separately in a test file, I found that mouse clicks are either always pressed or never pressed, depending on the code. The space bar presses alone work just fine, it’s the stipulation that the mouse must also be clicked that I can’t seem to achieve.
I am new to Psychopy and have limited coding knowledge (if that’s not already evident ). Any help would be immensely appreciated!
SC_DRT.psyexp (41.3 KB)