Hi Fran,
In brief, there's not a built-in way to do this. But, since you are
using the coder, it should be pretty easy to do something close. Just
have to have a loop in which you listen for individual key presses,
using event.getKeys or event.waitKeys(), and when a key is detected,
append it to a string (or remove the last character, if backspace was
pressed, or end the trial if return was pressed, for example--you'll
need to add the logic for the various cases). then set the text of a
TextStim to the new string, then draw() the TextStim and finally
win.flip() to display the new string. (you will also need to redraw
other things that you want to display, such as the object, if you
like). This way the string will be displayed and will grow in both
directions, right and left from the center point. Then save the string
when the loop is exited.
--Jeremy
On Wed, Aug 15, 2012 at 2:43 PM, Fran <
f.kon...@gmail.com> wrote:
> Hello,
>
> I'm planning an experiment where participants have to recognise objects. As
> soon as they do so, they have to press a key and then enter the name of the
> object. I would like to display whatever they're typing directly on the
> screen so the participant can see it; additionally the input has to be
> recorded as a string so it can be compared to names in a database later on.
>
> My problem is that I'm trying to find a way how to record their input and
> display it directly on the screen - I suppose I could use event.getKeys, but
> that only records one keypress at a time. Is there an elegant way of doing
> this? I've looked at the demos and at the documentation online, but haven't
> been able to find anything.
>
> I use the coder version of PsychoPy, by the way.
>
> Any help would be much appreciated!
>
> Warm regards,
> Fran
>
> --
> You received this message because you are subscribed to the Google Groups
> "psychopy-users" group.
> To post to this group, send email to
psychop...@googlegroups.com.
> To unsubscribe from this group, send email to
>
psychopy-user...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/psychopy-users/-/zzGNSRsBuzkJ.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>