up Inquisit Language Reference

correctresponse attribute

The correctresponse attribute specifies the set of responses considered correct for a given trial.

Member of

<checkboxes> <defaults> <dropdown> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <textbox> <trial>

Syntax

/ correctresponse = ("character", "character",...)

or

/ correctresponse = (scancode, scancode, ...)

or

/ correctresponse = (stimulusname, stimulusname, ...)

or

/ correctresponse = (mouseevent, mouseevent, ...)

or

/ correctresponse = (joystickevent, joystickevent, ...)

or

/ correctresponse = ("word", "word", ...)

or

/ correctresponse = (keyword)

or

/ correctresponse = (property, property, ...)

Parameters

character A character indicating a correct keyboard response.
scancode An integer specifying the scancode of a correct keyboard response. See the scancodes table for corresponding key value assignments.
stimulusname The name of a stimulus element defined elsewhere in the script.
mouseevent Any of the following mouse events:
Name Description
lbuttondown Left mouse button down
lbuttonup Left mouse button up
lbuttondblclk Left mouse button double click
rbuttondown Right mouse button down
rbuttonup Right mouse button up
rbuttondblclk Right mouse button double click
mbuttondown Middle mouse button down
mbuttonup Middle mouse button up
mbuttondblclk Middle mouse button double click
joystickevent Any of the following joystick events:
Name Description
buttona button a
buttonb button b
buttoncenter center button
buttonguide guide button
buttonselect selection button
buttonstart start button
buttonup up direction button
buttondown down direction button
buttonleft left direction button
buttonright right direction button
buttonx x button
buttony y button
buttonl1 left shoulder button
buttonl2 left trigger button
buttonl3 left stick button
buttonr1 right shoulder button
buttonr2 right trigger button
buttonr3 right stick button
leftthumbstickback left thumbstick back value
leftthumbstickforward left thumbstick forward value
leftthumbstickleft left thumbstick left value
leftthumbstickright left thumbstick right value
rightthumbstickback right thumbstick back value
rightthumbstickforward right thumbstick forward value
rightthumbstickleft right thumbstick left value
rightthumbstickright right thumbstick right value
change any change in joystick state
word A string (in quotes) indicating a correct spoken or openended response.
keyword Can be any of the following values:
Name Description
noresponse The absence of a response is considered correct. This setting requires that a timeout be defined for the trial.
anyresponse Any response is considered correct.

Remarks

This attribute specifies an array of responses considered correct for this trial. Responses specified in correctresponse are automatically considered valid responses and need not also be specified in validresponse. Inquisit uses this attribute to determine whether the subject's response was correct for a given trial so that the error feedback can be given if necessary and to determine whether the value (0 or 1) should written to the "correct" column of the data file. 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 correct response. This setting can be used in conjunction with the timeout attribute to implement "go/no go" tasks.

For voice and openended input, the correctresponse can be set to a stimulus name, in which case the currently selected item in that stimulus is considered a correct response. This is useful for naming or recall tasks where the correct response is determined by whatever stimulus item is currently presented.

For mouse input, the correctresponse can be set to a stimulus name, in which case the subject must click on the area of the screen occupied by the stimulus.

Examples

In the following trial, pressing the space bar or "8" key is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(" ", "8")
</trial>

In the following trial, pressing the tab key is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(15)
</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 correct:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(values.leftresponse, values.rightresponse)
</trial>

In the following trial, a right mouse press is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=mouse
/ correctresponse=(rbuttondown)
</trial>

In the following trial, moving the right joystick left or right is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=joystick
/ correctresponse=(rightthumbstickleft, rightthumbstickright)
</trial>

In the following trial, a clicking the area on the screen occupied by the "sometext" stimulus is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=mouse
/ correctresponse=(sometext)
</trial>

In the following trial, pronouncing the currently selected item in "sometext" is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=voice
/ correctresponse=(sometext)
</trial>

In the following trial, typing the currently selected item in "sometext" is considered correct:

<openended mytrial>
/ stimulusframes=[1=sometext]
/ correctresponse=(sometext)
</openended>

In the following trial, typing "yes" is considered correct:

<openended mytrial>
/ stimulusframes=[1=sometext]
/ correctresponse=("yes")
</openended>

In the following trial, the absence of a response before the 1000 millisecond deadline is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=voice
/ validresponse=(sometext)
/ correctresponse=(noresponse)
/ timeout = 1000 </trial>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.