The monkeyresponse attribute specifies the set of responses that the monkey should choose from when performing a given trial.
<trial>
or
/ monkeyresponse = (scancode, scancode, ...)or
/ monkeyresponse = (property, property, ...)or
/ monkeyresponse = [expression; expression; expression;...]string | A string indicating a valid response for the given input mode. For example, this could be the name of a stimulus, mouse event, or a joystick event. |
scancode | An integer specifying the scancode of a valid keyboard response. See the scancodes table for corresponding key value assignments. |
property | The name of a property whose value resolves to a valid response for the given input mode. |
expression | An expression that resolves to a valid response for the given input mode. |
This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit encounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the monkeyresponse attribute can be used to make sure that the monkey always gives consent.
The following trial makes sure the monkey always consents to participate:
<trial consent>
/ stimulusframes=[1=consentform, agreebutton, disagreebutton]
/ inputdevice=mouse
/ validresponse=(agreebutton, disagreebutton)
/ monkeyresponse=("agreebutton")
/ ontrialend=[if (trial.consent.response == "disagreebutton") script.abort()]
</trial>
The following trial makes sure the monkey always consents to participate:
<trial example>
/ stimulusframes=[1=target]
/ inputdevice=keyboard
/ validresponse=("e", "i")
/ monkeyresponse=(values.monkeyresponse)
</trial>