Suppressing keyboard output during experiment.

I'm not sure if this is a MATLAB question or a Psychtoolbox question. Whenever I run an
experiment using a window created with the Screen('openwindow') command, all of the
keypresses are treated as normal typing, and I end up with an unwanted string of
characters in my command window or my code. It's more of a nuisance than anything, but
it would be nice if there is a way to fix the problem. Does anyone else have this problem or
know how to fix it? I'm running PTB 3.0.8 on MATLAB 7 and OSX 10.3.9.

Eric
vanbogaert.eric@...
1 Like
Another method with PTB 3.0.8 and Matlab running with Java enabled is
to add a: ListenChar(2) at the top of your script and a ListenChar(0)
at the end to enable/disable routing of keypresses to Matlab. This
doesn't work in -nojvm mode and if your script crashes, you'll have to
press CTRL+C once to reenable keyboard input.

I like the smart solution of Ted Wright though :)
-mario

--- In psychtoolbox@yahoogroups.com, "Charles E. (Ted) Wright"
<cew@...> wrote:
>
> If what you are typing during your experimental run does not include the
> Enter key and if you are willing to type the Enter key at the end of
your
> run, you can easily solve this problem by including the line
>
> input('', 's');
>
> at the end of your code. There are probably elaborations of this
strategy
> that will work if either of the two assumptions above are not true,
but I
> have not given them any thought.
>
> Ted Wright
>
> On Fri, 27 Oct 2006, eric.vanbogaert wrote:
>
> > I'm not sure if this is a MATLAB question or a Psychtoolbox
question. Whenever I run an
> > experiment using a window created with the Screen('openwindow')
command, all of the
> > keypresses are treated as normal typing, and I end up with an
unwanted string of
> > characters in my command window or my code. It's more of a
nuisance than anything, but
> > it would be nice if there is a way to fix the problem. Does anyone
else have this problem or
> > know how to fix it? I'm running PTB 3.0.8 on MATLAB 7 and OSX 10.3.9.
> >
> > Eric
> > vanbogaert.eric@...
> >
> >
> >
> >
> >
> > Post your message to: psychtoolbox@yahoogroups.com
> > Please indicate OS9, OSX, or WIN version, and include your full name.
> > Denis Pelli, David Brainard, and Allen Ingling.
> > http://psychtoolbox.org
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>