A response handler element that records subject response by typing text in a text box, and optionally saves to a text file. At default the subject can type text of any length and press Enter to record it as a response and end the element. Alternatively you can let the user press Enter for line breaks and any mouse button to record response.
See also keyPress elements.
By default Psychtoolbox uses its own text renderer plugin. If this fails, it falls back to a more basic text renderer in your operating system and reports so in its messages at experiment startup. In this case you may see problems with text quality, alignment, or boundaries. See Psychtoolbox Screen('DrawText') for general information on text renderers, and DrawTextPlugin help for troubleshooting.
By default yes, when it records one response. You can change number of responses to wait for in property maxNumResponses.
"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.
fontName
fontSize
color
lineSpacing
boxSize
margin
boxColor
enterResponds
recordNumeric
fileName
numberFile
minNumDigitsInFileName
n_device
All visual elements
position
depth
nn_eyes
rotation
flipHorz
flipVert
colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma
channelResolution
backColor
addDisplay
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
vary
staircase
All objects
info
report
Default: Arial
A string setting font. See Psychtoolbox Screen('TextFont') for more information on font names.
Default: 0.7 deg
This sets font height (deg). Specifically it sets height of the "em box" for the font. Typically upper case characters are a little smaller than this. If you need more information, see Wikipedia https://en.wikipedia.org/wiki/Point_(typography) for a starting point.
Default: black
A 1×3 RGB vector with numbers between 0–1 setting font color.
Default: 1.3-spaced
A number: 1 = single-spaced, 2 = double, 1.5 = 1 & 1/2, etc. This multiplies line height without affecting font size (set in fontSize above). 1 = each line's baseline is precisely fontSize distance from the next line's baseline.
Default: boxSize = 12 deg width, 8 deg height
Default: margin = 0.4 deg
Default: boxColor = 90% white
margin sets space between the box and text edges (deg).
boxColor is a 1×3 RGB vector with numbers between 0–1 setting text box color.
Default: pressing Enter records response
<cd>true<cd>/<cd>false<cd>: At default <cd>true<cd>, the subject presses Enter to submit the text they have typed as a response (and at default maxNumResponses = 1 this ends the element). In this mode the subject can type one line of text (possibly wrapping). Or <cd>false<cd> = pressing Enter starts a new line instead, and clicking any mouse button records response. In this mode the subject can type multiple lines of text.
Default: response can be anything, recorded as string
<cd>true<cd>/<cd>false<cd>: <cd>true<cd> = if the subject inputs text that is a single number then response value recorded is numeric data type, not string. The element will also beep and not allow response if the text is not a single number. <cd>false<cd> = record any text, and always as string.
Default: fileName = don't save to file
Default: numberFile = automatically number files
Default: minNumDigitsInFileName = 1
If you set fileName:
numberFile = <cd>true<cd>/<cd>false<cd>: If = <cd>true<cd> (default), the element adds a number to file name starting at 1 and incrementing as needed to not change existing files. This means if you have multiple textInput elements in an experiment, you can set fileName the same for all of them (e.g. text.txt) and they will write different files numbered in the order they run in (e.g. text1.txt, text2.txt, text3.txt, ...). If you set numberFile = <cd>false<cd> then the element will not add a number and instead will append to any existing file with the specified name.
minNumDigitsInFileName sets the minimum number of digits to use for numbering files. e.g. 3 → text001.txt, text002.txt, text003.txt, ...
See also record properties fileName_r, n_file below.
Default: default keyboard
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.
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.
position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars
(None)
(None)
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.
fileName_r
n_file
All response handler elements
response
responseScore
responseTime
responseLatency
d_responseTime
numResponses
All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable
All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable
trigger
triggerTime
d_triggerTime
numTriggers
syncTime
fileName_r is a string recording name of the file written to. This includes number added if numberFile = <cd>true<cd>.
n_file records the number added (numeric) if numberFile = <cd>true<cd>.