The validResponse attribute specifies the set of responses considered valid for a given trial.
<defaults> <checkboxes> <dropdown> <image> <listbox> <radioButtons> <slider> <textbox> <trial> <openended> <sliderTrial>
or
/ validResponse = (scancode, scancode, ...)or
/ validResponse = (anyResponse, noResponse, ...)or
/ validResponse = (stimulusname, stimulusname, ...)or
/ validResponse = (mouseevent, mouseevent, ...)or
/ validResponse = (gamepadevent, gamepadevent, ...)or
/ validResponse = (joystickevent, joystickevent, ...)or
/ validResponse = (word, word, ...)or
/ validResponse = (keyword)or
/ validResponse = (expression, expression, ...)Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
character | string | A character indicating a valid keyboard response. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
scancode | integer | An integer specifying the scancode of a valid keyboard response. To determine the scancode of a given key, use the "Keyboard Scancode..." command on Inquisit's Tools menu, or see the scancodes table for corresponding key value assignments. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mouseevent | mouseeventenum |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gamepadevent | gamepadeventenum |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
joystickevent | joystickeventenum |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
response | responseenum |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stimulusname | visualstimulus | The name of a stimulus element defined elsewhere in the script. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
word | string | A string (in quotes) indicating a valid spoken or openended response. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyword | responseenum |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expression | value | A dynamic expression that resolves to response value. |
This attribute specifies an array of responses considered valid for this trial. Inquisit uses this attribute to determine whether a subject's response should be considered a valid possible response for the trial, or whether is should be ignored. The syntax of the settings depends on the type of input device used (e.g., mouse, keyboard, voice) as defined by the inputDevice attribute.
For all input devices, "noResponse" can be specified to indicate that the absence of a response should be considered a valid response. This setting can be used in conjunction with the timeout attribute to implement "go/no go" tasks.
For voice and openended input, the validResponse can be set to a stimulus name, in which case the all of the possible items in that stimulus are considered a valid responses.
For mouse input, the validResponse can be set to a visual stimulus name, in which case the subject may click on the area of the screen occupied by the stimulus. For overlapping visual stimuli, Inquisit evaluates whether the mouse click hits a stimulus according to the order in which stimuli are listed in validResponse. Thus, if a click falls within the region of two or more stimuli, the response will be counted as the whichever stimulus is listed prior to the others.
In the following trial, pressing the space bar or "8" key is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=keyboard
/ validResponse=(" ", "8")
</trial>
In the following trial, pressing the key with a scancode or character value equal to the value.leftresponse and value.rightresponse properties is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=keyboard
/ validResponse=(values.leftresponse, values.rightresponse)
</trial>
In the following trial, pressing the tab key is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=keyboard
/ validResponse=(15)
</trial>
In the following trial, a right mouse press is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=mouse
/ validResponse=(rButtonDown)
</trial>
In the following trial, pulling the left joystick back is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=joystick
/ validResponse=(leftthumbstickback)
</trial>
In the following trial, a clicking the area on the screen occupied by the "myText" stimulus is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=mouse
/ validResponse=(myText)
</trial>
In the following trial, pronouncing the currently selected item in "myText" is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=voice
/ validResponse=(myText)
</trial>
In the following trial, typing the currently selected item in "myText" is considered valid:
<openended myTrial>
/stimulusTimes=[0=myText]
/ validResponse=(myText)
</openended>
In the following trial, typing "yes" is considered valid:
<openended myTrial>
/stimulusTimes=[0=myText]
/ validResponse=("yes")
</openended>
In the following trial, the absence of a response before the 1000 millisecond deadline is considered valid:
<trial myTrial>
/stimulusTimes=[0=myText]
/ inputDevice=voice
/ validResponse=(myText)
/ validResponse=(noResponse)
/ timeout = 1000 </trial>