keyAdjuster

 elements

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

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)

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 repeating adjustment (sec) when subject holds key(s) down.

repeatRate is adjustment repeat rate (adjustments/sec).

n_device

Default: listen to all attached keyboards

You can specify a single device to listen to in the form of a HID device number. You can use Psychtoolbox functions GetKeyboardIndices or PsychHID('Devices') to see available device numbers.

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

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.