responseWindow
Experiments Surveys & forms On surveys only a plain number works and auto-submits the page after that many milliseconds; the full start-position syntax applies to experiment trials only.
responseWindow controls WHEN the participant is allowed to respond within a trial and, optionally, for HOW LONG.
Use it to: limit response time (a timeout that auto-advances the trial), open responses only after the stimulus disappears (afterStim), keep responses open through the whole trial (allTrial/allStim), enforce a minimum viewing time before responses count (min:), or delay the window by a fixed time from trial start (a numeric start time).
Syntax
Section titled “Syntax”Write a number of milliseconds to set a response deadline: 2000 opens the window when the last stimulus appears and records timeout if no response arrives within 2 seconds.
The other forms, most common first:
- A position keyword says when the window opens:
afterStim(only once the stimulus has disappeared, or playback has ended for audio/video),withStim(while each stimulus screen is up),allStim(from trial start until the last stimulus is hidden),allTrial(from trial start, no automatic close). position_Ncombines a position with an N ms deadline that starts when the window opens:afterStim_3000.S_Nwith two numbers opens the window S ms after trial start and closes it N ms later:500_2000.min:A;max:Bblocks responses for the first A ms (early presses are buffered and applied when the minimum ends) and times out at B ms.min:Aalone keeps the default opening with a minimum;max:Balone is a plain deadline.- Leaving the cell empty opens the window with the last stimulus and keeps it open until a response arrives.
Times are milliseconds, except in frames-based trials (see Tips & gotchas).
Options
Section titled “Options”| Value | Behavior |
|---|---|
| empty cell | Default. Window opens when the last stimulus screen appears and STAYS open after the stimulus is hidden, indefinitely, until a response |
N (integer ms, e.g. 2000) | Opens at last stimulus onset; closes N ms later. On close with no response: a timeout response is recorded and the trial auto-advances |
Nf (e.g. 30f) | A deadline counted in display frames; the f suffix switches the whole trial to frame-based timing for all its delays |
lastStim | Opens at last stimulus onset; when the last stimulus is hidden (its presTime elapsed) with no deadline set, the window closes, a timeout response is recorded if none arrived, and the trial auto-advances |
lastStimAfterStim | Same as the empty cell (explicit form) |
afterStim | Opens only AFTER the last stimulus is hidden or, for audio/video, after playback ends; stays open until response (or deadline if combined) |
withStim | Opens at each stimulus screen onset, closes whenever the screen is hidden; after the LAST screen is hidden it records a timeout response if none and auto-advances |
allStim | Opens at trial start; closes and auto-advances when the last stimulus is hidden |
allTrial | Opens at trial start; no automatic close unless a deadline is set |
position_N (e.g. afterStim_3000) | Position as above plus an N ms deadline starting when the window opens |
_N (e.g. _3000) | Empty position defaults to lastStim |
S_N (both numeric, e.g. 500_2000) | Opens S ms after trial start; closes at S+N ms from trial start |
0 | Opens immediately at trial start, no deadline |
min:A;max:B (or max:B;min:A) | Opens at last stimulus onset; responses are blocked and buffered for the first A ms, and the window closes at B ms |
min:A | Default open behavior plus an A ms minimum before responses count |
max:B | Shorthand for a plain deadline |
| any other token | Not a recognized start position, so the response window NEVER opens. This includes typos and includes waitStimEnd written into this column |
Defaults & missing values
Section titled “Defaults & missing values”With the column absent or the cell left empty, the window opens with the last stimulus and remains open after it disappears, without limit, until a response arrives.
When a deadline expires without a response, timeout is recorded as the response (or <partial>;timeout when a partial response such as typed text, a slider position, or an incomplete multi-part answer exists) and the trial auto-advances. A 0 deadline is ignored; a bare 0 opens the window at trial start with no deadline. On microphone trials a live recording finishes first; see Works with.
Works with
Section titled “Works with”waitStimEnd: any value there overrides the window to open after the stimulus ends, while keeping a deadline set here.typelearn: the response window never opens on learn trials.responseOptionswaitTimeout: the window is never auto-closed, so a deadline here stops mattering.responseOptionswaitResponseWindow: the window’s timers keep running even after a response.min:minimum windows: key presses and stimulus clicks made during the minimum are BUFFERED and applied the moment the minimum ends; response boxes, comment inputs, labels and sortables are disabled then re-enabled; button clicks buffer the same way.responseTypemic: while a recording is live, a deadline does not cut it off; the pendingtimeoutresponse waits for the recording to finalize, and key or button responses during a live recording are deferred the same way.trialTextwithResponse: opening the window is what shows thewithResponsetrial text.- RT measurement starts when the window opens.
- Survey rows: only a plain numeric value works, and it acts as an auto-submit timer for the survey page; the position syntaxes do nothing there.
- Instruction rows: a value here with no presTime auto-advances the instruction after the deadline; a position-only value (no number) advances it immediately, which is rarely what you want.
Examples
Section titled “Examples”| type | stim1 | presTime | responseWindow | keyboard | key |
|---|---|---|---|---|---|
| test | face01 | 500 | 2000 | a,l | a |
type,stim1,presTime,responseWindow,keyboard,key test,face01,500,2000,"a,l",a
Stimulus shows 500 ms; responses (a/l) accepted from stimulus onset; if none within 2000 ms the response is recorded as timeout and the trial advances.
| type | stim1 | presTime | responseWindow | keyboard |
|---|---|---|---|---|
| test | word_list | 1500 | afterStim_3000 | space |
type,stim1,presTime,responseWindow,keyboard test,word_list,1500,afterStim_3000,"space"
Space bar only counts after the stimulus has been hidden (1500 ms), then a 3000 ms window runs.
| type | stim1 | presTime | responseWindow | button1 | button2 |
|---|---|---|---|---|---|
| test | scene01 | 0 | min:500;max:4000 | Old | New |
type,stim1,presTime,responseWindow,button1,button2 test,scene01,0,min:500;max:4000,Old,New
Buttons appear with the stimulus but are inert for the first 500 ms (clicks buffered); at 4000 ms the trial times out and auto-advances.
Tips & gotchas
Section titled “Tips & gotchas”- Writing
waitStimEndinsideresponseWindowsilently disables responding: it is its own column, not a value of this one. - Any value containing
mintriggers the min/max reading, andmin:0still counts as “has a minimum window”. - An
fsuffix anywhere inpresTime,ISI,responseWindoworITIswitches the ENTIRE trial to frame-based timing for all four delays. 0does not mean “unlimited at last stimulus”: it opens the window at trial start, which is different from leaving the cell empty (opens at last stimulus onset).
Common combinations
Section titled “Common combinations”responseWindow appears in these worked recipes:
- Voice-recorded picture naming: Collect spoken picture-naming responses, saving an audio recording and the voice onset for every trial.
- Adaptive staircase: Home in on a participant’s detection threshold by making trials harder after correct answers and easier after misses.
- Go/no-go task: Score a press as correct on go trials and a withheld response as correct on no-go trials.
- Respond after the clip ends: Play an audio clip and only accept the keypress once playback has finished, with RT measured from the end of the clip.
- Visible countdown per trial: Show a countdown that restarts on every trial, with the deadline itself enforced by the response window.