mouseClick

 element objects

A response handler element that records subject response by mouse click. At default waits for one click anywhere on screen, then records response and ends on its own. Note mouseClick elements may not work with trackpad taps.

Response values generated are mouse button numbers clicked. You can also use properties to specify areas on screen the subject can click on and record area numbers clicked instead.

▸ Object ends on its own?

By default yes, when it records one response. You can change number of responses to wait for in property maxNumResponses. If you set maxNumResponses = <cd>inf<cd>, records responses indefinitely until a condition you set in property end.

"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).

No—runs until any condition you set in property end.

Input properties
Record properties
mouseClick
elements (see below)

areaPositions
areaSize
cursorShape

All visual elements
position

All adjuster elements have
adjust

All response handler elements
translateResponse
scoreResponse
correctResponse
scoreResponseForStaircase

maxNumResponses
recordDefaultResponse
registerTrigger
autoResponse
autoResponseLatency

All elements
start
end

startBuffer
endBuffer

syncExperiment
vary
staircase

All objects
report
info

areaPositions
areaSize

Default: click anywhere and response value = mouse button number

If you set these properties, the subject can only click on certain areas on screen and response values are numbers corresponding to areas (1, 2, 3, ...). If you position other elements at these areas and set their sizes correspondingly, you can build the effect of clicking on them.

Set one or more rectangular areas using a 2-column matrix containing centers [x y] (deg) in areaPositions. Row number corresponds to area number. + = right⁠/⁠down and positions are relative to element position, which you can set in position (default relative to screen center).

Also set areaSize to a number that is side length for square areas, or a vector [width height] for rectangular areas (deg). Or you can use multiple rows (a column vector or matrix) for different sizes.

OR

Default = subject can click anywhere and response values are mouse button numbers clicked.

cursorShape

Default: current shape

A string or number setting mouse cursor shape. This goes to the type input of Psychtoolbox ShowCursor—see there for more information. Standard options are:

<cds>"Arrow"<cds>
<cds>"CrossHair"<cds>
<cds>"Hand"<cds>
<cds>"SandClock"<cds>
<cds>"TextCursor"<cds>

Adjustable properties

You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.

Adjustable properties

Adjustable properties

position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars

(None)

(None)

Input properties
Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.

mouseClick
elements (see below)

All response handler elements
response
responseScore
responseTime
responseLatency
d_responseTime
numResponses

All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable

trigger
triggerTime
d_triggerTime
numTriggers

syncTime