Skip to content

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

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_N combines a position with an N ms deadline that starts when the window opens: afterStim_3000.
  • S_N with two numbers opens the window S ms after trial start and closes it N ms later: 500_2000.
  • min:A;max:B blocks responses for the first A ms (early presses are buffered and applied when the minimum ends) and times out at B ms. min:A alone keeps the default opening with a minimum; max:B alone 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).

ValueBehavior
empty cellDefault. 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
lastStimOpens 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
lastStimAfterStimSame as the empty cell (explicit form)
afterStimOpens only AFTER the last stimulus is hidden or, for audio/video, after playback ends; stays open until response (or deadline if combined)
withStimOpens 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
allStimOpens at trial start; closes and auto-advances when the last stimulus is hidden
allTrialOpens 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
0Opens 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:ADefault open behavior plus an A ms minimum before responses count
max:BShorthand for a plain deadline
any other tokenNot a recognized start position, so the response window NEVER opens. This includes typos and includes waitStimEnd written into this column

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.

  • waitStimEnd: any value there overrides the window to open after the stimulus ends, while keeping a deadline set here.
  • type learn: the response window never opens on learn trials.
  • responseOptions waitTimeout: the window is never auto-closed, so a deadline here stops mattering.
  • responseOptions waitResponseWindow: 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.
  • responseType mic: while a recording is live, a deadline does not cut it off; the pending timeout response waits for the recording to finalize, and key or button responses during a live recording are deferred the same way.
  • trialText withResponse: opening the window is what shows the withResponse trial 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.
typestim1presTimeresponseWindowkeyboardkey
testface015002000a,la

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.

typestim1presTimeresponseWindowkeyboard
testword_list1500afterStim_3000space

Space bar only counts after the stimulus has been hidden (1500 ms), then a 3000 ms window runs.

typestim1presTimeresponseWindowbutton1button2
testscene010min:500;max:4000OldNew

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.

  • Writing waitStimEnd inside responseWindow silently disables responding: it is its own column, not a value of this one.
  • Any value containing min triggers the min/max reading, and min:0 still counts as “has a minimum window”.
  • An f suffix anywhere in presTime, ISI, responseWindow or ITI switches the ENTIRE trial to frame-based timing for all four delays.
  • 0 does 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).

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.