up Inquisit Language Reference

validresponse attribute

The validresponse attribute specifies the set of responses considered valid for a given trial.

Member of

<checkboxes> <defaults> <dropdown> <listbox> <radiobuttons> <slider> <textbox> <trial>

Syntax

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

or

/ validresponse = (scancode, scancode, ...)

or

/ validresponse = (stimulusname, stimulusname, ...)

or

/ validresponse = (mouseevent, mouseevent, ...)

or

/ validresponse = (joystickevent, joystickevent, ...)

or

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

or

/ validresponse = (keyword)

or

/ validresponse = (property, property, ...)

Parameters

character A character indicating a valid keyboard response.
scancode 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.
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
mousemove Mouse is moved in any direction
mousewheel Mouse wheel is scrolled in any direction
joystickevent Any of the following joystick events:
Name Description
left left
right right
back back
forward forward
up up
down down
rleft rotate left
rright rotate right
rback rotate back
rforward rotate forward
rup rotate up
rdown rotate down
pov1forward - pov4forward point of view 1, 2, 3, or 4 forward
pov1right - pov4right point of view 1, 2, 3, or 4 right
pov1back - pov4back point of view 1, 2, 3, or 4 back
pov1left - pov4left point of view 1, 2, 3, or 4 left
slider1left - slider2left slider 1 or 2 left
slider1right - slider2right slider 1 or 2 right
button1 - button32 button 1 - 32 pressed
change any change in joystick state
word A string (in quotes) indicating a valid spoken or openended response.
keyword Can be any of the following values:
Name Description
noresponse The absence of a response is considered valid. This setting requires that a timeout be defined for the trial.
anyresponse Any response is considered valid.
property A dynamic property that resolves to either a character or a scancode integer.

Remarks

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.

Examples

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

<trial mytrial>
/stimulusframes=[1=sometext]
/ 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>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ validresponse=(values.leftresponse, values.rightresponse)
</trial>

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

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ validresponse=(15)
</trial>

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

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

In the following trial, rotating the joystick left is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=joystick
/ validresponse=(rleft)
</trial>

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

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

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

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

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

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

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

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

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

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

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