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 and one key to say "done adjusting". By default waits for one "done adjusting" response, then ends on its own (so you don't need to set property end unless you want it to end earlier). Response values generated are adjusted property value(s).

For any trial you define in an experiment script, you can make one or more 

keyAdjuster

 objects using function 

keyAdjuster

Object and input them to addTrial.

For any trial you define in an experiment script, you can make one or more 

keyAdjuster

 objects using function 

keyAdjuster

Object and input them to addTrial.

Input properties

Adjustable properties

You can allow the subject to adjust the following input properties of an object of this type during the experiment using an adjuster element. If you need to make other properties adjustable, you can copy the element type using newPbType and edit it.

position
nn_eyes
rotation
opacity

(None)

(None)

n_device

Default: default device, usually keyboard

<cd>[]<cd> = default device according to Psychtoolbox, which is generally the keyboard. Usually this is all you need to know.

Optionally you can listen for input from some other keyboard-like device. n_device is HID device number to listen to. You can use Psychtoolbox functions GetKeyboardIndices or PsychHID('Devices') to see available device numbers. A keyAdjuster element uses Psychtoolbox KbCheck underneath and n_device goes to the input of that function. See help for these functions if you need more information on device numbers.

deltas

No default

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

{column 1} key number, or vector of key numbers for a key combination. Key numbers depend on your operating system. The little tool KbShow is an easy way to find them at the MATLAB command line. See also Psychtoolbox KbName. Note this is before responses are received, so these are always key numbers, even if you use property translateResponse to record responses as other values.

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

Usually you also want to assign a key the subject can press to say they are done adjusting (the "response"). Do this using the string <cds>"r"<cds> in column 2.

Use adjust to set where and how adjustments are applied.

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).

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.