# Visual numpad for providing responses in digit span task

**URL:** <https://discourse.psychopy.org/t/visual-numpad-for-providing-responses-in-digit-span-task/29038>\
**Category:** Builder\
**Tags:** response\
**Created:** [May 7, 2022, 9:23pm UTC](https://discourse.psychopy.org/t/visual-numpad-for-providing-responses-in-digit-span-task/29038 "2022-05-07T21:23:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.e.shub](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/daniel.e.shub/32/4609_2.png) [@daniel.e.shub](https://discourse.psychopy.org/u/daniel.e.shub)\
**Post date:** [May 7, 2022, 9:23pm UTC](https://discourse.psychopy.org/t/visual-numpad-for-providing-responses-in-digit-span-task/29038/1 "2022-05-07T21:23:38Z")

</div>

I want to run a digit span task where the subjects need to respond the sequence of digits that were presented. I have been using the num pad to collect key responses. I would like to switch to a gui implementation that looks more like a phone keypad.

Has anyone already done something like this such that there is existing code I drop in as a code component (or even better a builder component)?

Assuming it has not been done before do I build this out of existing builder components (e.g., an image of the keypad and a mouse component to get the location of the clicked, a code component to translate that location to a number, a loop to allow multiple responses, and a text stim component to display the response) or do I build/steal a proper gui keypad and then import that through a code component?

Ideally I would be able to bundle whatever I come up with so it can be used in other experiments, so I am worried about combining a bunch of existing builder components.

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [May 9, 2022, 5:37am UTC](https://discourse.psychopy.org/t/visual-numpad-for-providing-responses-in-digit-span-task/29038/2 "2022-05-09T05:37:19Z")

</div>

> [@Question on implementing clickable stimuli](https://discourse.psychopy.org/t/question-on-implementing-clickable-stimuli/6874/2):
>
> In Builder, the easiest way to do this is to create specific stimuli that correspond to the clickable region of your main image stimulus. For example, you could create a polygon stimulus (like a rectangle, or with say 99 sides, effectively a circle) and overlay it upon your background image, one for each clickable region. Initially, give the polygons a colour so you can see if they overlap correctly, but when you know they are in place, you can set them to be invisible. Then you put the names o…

That should get you started - you’ll want to collect more than one response though, so don’t set the mouse component to end the routine on a valid click. We’d need to know how you would like to end the routine to give advice on that.
