Docs @ Psychtoolbox Wiki : bvlWaitForInput

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

bvlWaitForInput

PsychtoolboxPsychGLImageProcessingprivate

[strInputName, x, y] = bvlWaitForInput(fSeconds [, fBufferWindow])

Wait for a key press or mouse input, then return the input name and mouse position.
strInputName is a string identifier of the key. (Defined in KbName)
x, y are the pixel coordinates of the mouse

Returns after fSeconds, if no key is pressed.
If fSeconds is not specified, returns after 1.0 seconds

fBufferWindow allows you to specify the time buffer (window) between
key/mouse events that will be accepted. This way we don't register the
key-down and key-up of the same key as two events. Nor do we register
one key press as multiple events. If this parameter is not passed in,
the default is 0.250 (250 milliseconds). Reduce this if you need
constant feedback, for instance, in tracing out a rectangle when
selecting points in the calibration, I use 0.010 seconds.

Some example strInputNames:
LeftArrow
RightArrow
UpArrow
DownArrow
ESCAPE
LeftMouse
MiddleMouse
RightMouse

2007-05-15 - cburns - update to fix bugs in events not being handled.
2007-05-10 - cburns - Rewrote for include mouse input and update
for Psychtoolbox 3.x install.

2006-01-31 - cburns - Bankslab, UC Berkeley




Path
Psychtoolbox/PsychGLImageProcessing/private/bvlWaitForInput.m

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0478 seconds