New version of GetChar for Windows.

David Ing wrote:

> If, during an experiment, a subject were to accidently press the period
> button (.), then the experiment would terminate because the toolbox shuts
> itself down. I believe on the macs you have to press "cmd" and period, but
> on PCs it's just period. Maybe it would be a good idea to make the PC
> version follow the same rule, but for "ctrl" and period instead. That way,
> the experiments won't end prematurely.
>
David,

I have attached a new version of GetChar.dll and its help file GetChar.m. The
period key no longer causes GetChar to break. Now the "break" key causes it to
break.

This is different from the Mac version, which breaks when the command key (also
known as the "apple key") and the period key are hit in combination. Windows
has no command key, and the break key seemed like the natural choice to use on
that platform for that purpose. I have modified documentation in the GetChar.m
file accordingly.

The new version of GetChar.dll breaks when it sees the virtual keycode defined
by the windows constant "VK_CANCEL". According to the Programming Windows by
Charles Petzold: "The VK_CANCEL code is the only virtual key code that
involves pressing two keys at once (Ctrl-Break).". However, on my computer
GetChar now breaks when the <break> key alone is pressed. If anyone who tries
out the new version of GetChar is interested in giving feedback about whether
GetChar breaks with <ctrl><break> or instead with <break> alone, that would be
helpful.

Best,

Allen

PS. I'm pleased to hear that the Psychtoolbox is working out for you.


David Ing wrote:

> Hello Allen,
>
> I have been having very good luck with the psychophysics toolbox that you
> have developed. You have made my lab very productive and I will be sure to
> cite you in my papers.
>
> I have a suggestion. Here is a line of code that many experimenters use:
>
> key = getChar;
>
> If, during an experiment, a subject were to accidently press the period
> button (.), then the experiment would terminate because the toolbox shuts
> itself down. I believe on the macs you have to press "cmd" and period, but
> on PCs it's just period. Maybe it would be a good idea to make the PC
> version follow the same rule, but for "ctrl" and period instead. That way,
> the experiments won't end prematurely.
>
> Everything else I've used it for has been running very smoothly. Thanks.
>
> David Ing
> ing@...
> Research Assistant for the Maddox Lab
> (512) 232 2883