keyAdjuster

 element objects

An adjuster and response handler element that lets the subject adjust properties of other elements by key press. Also works with other keyboard-like devices. Use property deltas to assign keys to adjustment values.

Response values generated are adjusted property value(s).

▸ Object ends on its own?

By default yes, when it records one "done adjusting" 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
keyAdjuster
elements (see below)

deltas
responseKeyName
repeatDelay
repeatRate
n_device

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
preload
vary
staircase

All objects
info
report

deltas

No default

A 2-column cell array with each row assigning a key or key combination (e.g. Shift + Left) to an adjustment value:

{column 1} A string that is key name, or an array of strings for a key combination. Key names are common across operating systems. To get them you can use the tool showKey at the MATLAB command line (type help showKey for usage, but basically press a key to see its name or use inputs to get all key names). Alternatively you can use a number or vector of numbers that are key numbers. These are the same as used by Psychtoolbox functions like KbCheck. Note key numbers are different across operating systems. showKey also shows key numbers.

{column 2} Numeric value (not necessarily scalar) that is adjustment to apply when the key(s) are pressed.

Use adjust to set where and how adjustments are applied.

responseKeyName

Default: Enter

A string that is key name for the subject to say they are done adjusting (a "response"). Or a number for a key number. See deltas above about key names/numbers.

repeatDelay
repeatRate

Default: repeatDelay = 0.5 sec
Default: repeatRate = 4 adjustments/sec

repeatDelay is delay before starting to repeat adjustments when subject holds key(s) down (sec).

repeatRate is adjustment repeat rate (adjustments/sec).

n_device

Default: listen to all attached keyboards

If you want to narrow down which device to listen to, you can set a HID device number here. Use Psychtoolbox functions GetKeyboardIndices or PsychHID('Devices') to see available device numbers.

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.

keyAdjuster
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