Millisecond Forums

simultaneous button press

https://forums.millisecond.com/Topic14800.aspx

By sjstran12 - 10/31/2014

Hey,

I am trying to make it so two buttons will need to be pressed for the nextkey. How can I do this?

Thanks 
By Dave - 10/31/2014

In Inquisit, a <trial> registers a *single* response. Thus, it is not possible to do this. The next-best thing you can do is run two trials in sequence -- one to register the 1st button press, another one to register the 2nd.
By sjstran12 - 10/31/2014

Thank you. I guess I'll have to make due with the one
By sjstran12 - 11/1/2014

Is it possible to have the participant press one button and be required to press another button within x number of milliseconds in order to give the correct response?
By Dave - 11/1/2014

Yes, but as with your initial request above, you need two <trial> elements to do that. You can do the response evaluation via /iscorrectresponse a la

/ iscorrectresponse = [... && trial.2ndtrial.latency < 2000]
By sjstran12 - 11/4/2014

Is this what you mean? I want it so the valid response is this [("m") && trial.late.latency < 2000] but it wont allow me to put that in the validresponse

<trial late>
/ validresponse = ("z")
/timeout = 15000
</trial>

< trial  era >
/stimulusframes = [1=era, erastim]
/timeout = 3500
/validresponse = ("m")
/ iscorrectresponse = [("m") && trial.late.latency < 2000]
/responsetrial = ("m", method)
</trial>


By Dave - 11/4/2014

Your syntax in the /iscorrectresponse attribute is incorrect. It ought to be

/ iscorrectresponse = [trial.late.response == *ENTER THE NUMERICAL KEYBOARD SCANCODE FOR M HERE* && trial.late.latency < 2000]

For the appropriate scancode to enter above, see the "Keyboard Scan Codes" topic in the documentation as well as Tools -> Keyboard Scancodes...
By sjstran12 - 11/6/2014

I got an error that says invalid text

<trial late>
/ validresponse = (50)
/timeout = 15000
</trial>


< trial  era >
/stimulusframes = [1=era, erastim]
/timeout = 3500
/validresponse =  [trial.late.response == (44) && trial.late.latency < 2000)]
/responsetrial = ("m", method)
</trial>

By Dave - 11/6/2014

#1: You need to use */isvalidresponse*, not */validresponse*
#2: Your syntax is still wrong. It ought to be:

/ isvalidresponse =  [trial.late.response == 44 && trial.late.latency < 2000)]
By sjstran12 - 11/7/2014

no more error messages but pressing the buttons at the same time does nothing. 

<trial late>
/isvalidresponse = [(50)]
</trial>

< trial era >
/stimulusframes = [1=era, erastim]
/timeout = 15000
/ isvalidresponse = [trial.late.response == 44 && trial.late.latency < 2000]
/responsetrial = (" ", method)
</trial>

< trial method >
/stimulusframes = [1=iorm, iorm2]
/timeout = 15000
/ validresponse = ("z" "m")
/branch = [(openended.open)]
</trial>

By Dave - 11/7/2014


<trial late>
/isvalidresponse = [(50)]
</trial>

is invalid syntax (same issue as outlined previously).

< trial era >
/stimulusframes = [1=era, erastim]
/timeout = 15000
/ isvalidresponse = [trial.late.response == 44 && trial.late.latency < 2000]
/responsetrial = (" ", method)
</trial>

nowhere do you actually run <trial late>. Thus you cannot expect the above /isvalidresponse to do anything.


<trial first>
/ stimulusframes = [1=mytext]
/ validresponse = (44)
/ branch = [trial.second]
</trial>

<trial second>
/ validresponse = (50)
/ iscorrectresponse = [trial.second.latency < 2000]
</trial>

<block myblock>
/ trials = [1=first]
</block>

<text mytext>
/ items = ("Press Z and then M within 2 seconds.")
/ erase = false
</text>

By sjstran12 - 11/7/2014

ohhh I get what is going on now. Thank you so much for your help
By Dave - 11/7/2014

Great!