# Updating my response ("left" or "right") for feedback

**URL:** <https://discourse.psychopy.org/t/updating-my-response-left-or-right-for-feedback/12779>\
**Category:** Builder\
**Created:** [April 27, 2020, 8:12am UTC](https://discourse.psychopy.org/t/updating-my-response-left-or-right-for-feedback/12779 "2020-04-27T08:12:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![M\_Badwal](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@M\_Badwal](https://discourse.psychopy.org/u/M_Badwal)\
**Post date:** [April 27, 2020, 8:12am UTC](https://discourse.psychopy.org/t/updating-my-response-left-or-right-for-feedback/12779/1 "2020-04-27T08:12:16Z")

</div>

There seems to be a problem with updating my response for feedback, but I can’t quite make my mistake out.

See picture:  
If the participant clicks “left” or “right” I want to update the $response and present the clicked key as feedback.

In “Beginn Experiment”, response has been assigned: response = “Default”

 ![Screen Shot 2020-04-27 at 08.56.45](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/e/8eb64b29d728ab2b74ac5bc74d7e71c3ce4adb1c.jpeg)

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [April 27, 2020, 9:42pm UTC](https://discourse.psychopy.org/t/updating-my-response-left-or-right-for-feedback/12779/2 "2020-04-27T21:42:18Z")

</div>

Hi There,

I think you might want to move your current code snippet into the “End Routine” tab. Because you won’t know which key was pressed until the end of the routine. Then add a seperate “feedback” routine within your “animals\_01” loop but following your “trial” routine, add a text component in the feedback routine and set the text parameter in that component as $response.

Good luck!  
Becca

PS. I think similar but slightly different issue here [Printing a counter as participant feedback in next routine](https://discourse.psychopy.org/t/printing-a-counter-as-participant-feedback-in-next-routine/12515/4)

---

<div class="post-metadata">

**Author:** ![M\_Badwal](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@M\_Badwal](https://discourse.psychopy.org/u/M_Badwal)\
**Post date:** [April 28, 2020, 6:08am UTC](https://discourse.psychopy.org/t/updating-my-response-left-or-right-for-feedback/12779/3 "2020-04-28T06:08:58Z")

</div>

Good Morning Becca,

thanks a lot for the reply. I could fix the code somewhat but not completely yet (I needed to change my Text component to “set every repeat”).  
The response variable is being changed now.

I am still facing some problems, but I am getting there.

Best  
Marco
