I noticed in the History of ListenChar.m that:
05/31/09 mk Add support for Octave and Matlab in noJVM mode.
However, according to http://docs.psychtoolbox.org/ListenChar
"The only feature that works in parallel with KbQueues
is the suppression of spilling of keystroke characters into the Matlab or
Octave window during ListenChar(2) - at least on Linux and OSX, on
Windows this can't be prevented at all in "matlab -nojvm" mode.'
Tangentially, what this means is that ListenChar (and GetChar, as well) won't work in Windows when using nojvm mode.
However, I thought, "that's okay, I'll just use nodesktop or noawt mode."
Well, it turns out that it also won't work under nodesktop mode, and noawt mode. :(
For reference, there was the following thread discussing this back in 2007 (before the nojvm fix had been implemented): https://groups.yahoo.com/neo/groups/psychtoolbox/conversations/topics/6865
So, my questions are:
Is there any workaround for getting ListenChar(2) to work in Windows other than using full desktop mode+JVM, maybe something that has come up in the last 5 to 7 years? :)
Is there another way to block keyboard typing from appearing in the Command Window in nodesktop mode on Windows if there isn't any workaround?
If, in fact, there is no way to make it work in PsychToolbox on Windows, can this fact regarding nodesktop and noawt modes please be noted in the ListenChar and GetChar docs? The reason I ask is, it's not necessarily intuitive that if something doesn't work in nojvm mode that this will mean that it also won't work in nodesktop mode or noawt mode.
Thanks!