# \#mouse

**URL:** https://discourse.psychopy.org/tag/mouse/11.md

[Latest](https://discourse.psychopy.org/latest.md) · [Categories](https://discourse.psychopy.org/categories.md) · [Tags](https://discourse.psychopy.org/tags.md)

---

## [Clearing mouse and keyboard click buffers in back-to-back routines in a loop](https://discourse.psychopy.org/t/clearing-mouse-and-keyboard-click-buffers-in-back-to-back-routines-in-a-loop/45980)

<div class="topic-metadata">

**Author:** [@Avisha\_Avisha](https://discourse.psychopy.org/u/Avisha_Avisha)\
**Replies:** 7\
**Last updated:** [November 12, 2025, 12:47am UTC](https://discourse.psychopy.org/t/clearing-mouse-and-keyboard-click-buffers-in-back-to-back-routines-in-a-loop/45980 "2025-11-12T00:47:26Z")

</div>

OS: MacOS Pro M3 PsychoPy version: 2024.2.4, Python 3.8 Standalone Installation: Yes URL of experiment: N/A Run locally: No What are you trying to achieve? I want to ensure that mouse clicks and keyboard presses fr…

---

## [Custom Mouse using Builder](https://discourse.psychopy.org/t/custom-mouse-using-builder/45978)

<div class="topic-metadata">

**Author:** [@kierstin2697](https://discourse.psychopy.org/u/kierstin2697)\
**Replies:** 3\
**Last updated:** [November 10, 2025, 1:28pm UTC](https://discourse.psychopy.org/t/custom-mouse-using-builder/45978 "2025-11-10T13:28:24Z")

</div>

PsychoPy version: 2022.2.5 Py 3.8 Standard Standalone Installation? Y Do you want it to also run online? N What are you trying to achieve?: My cursor is difficult to see on my stimulus background and I just really wan…

---

## [Mouse recording error in the PsychoPy csv file](https://discourse.psychopy.org/t/mouse-recording-error-in-the-psychopy-csv-file/45033)

<div class="topic-metadata">

**Author:** [@Alexey\_Sozinov](https://discourse.psychopy.org/u/Alexey_Sozinov)\
**Replies:** 1\
**Last updated:** [June 13, 2025, 12:48pm UTC](https://discourse.psychopy.org/t/mouse-recording-error-in-the-psychopy-csv-file/45033 "2025-06-13T12:48:39Z")

</div>

I’d like to report an issue in csv file recording. I avoided this by using log file, but this might be useful to know anyway. OS (e.g. Win10): PsychoPy version (e.g. 2024.2.4 Py 3.8): Standard Standalone Installation?…

---

## [AttributeError: 'str' object has no attribute 'contains'](https://discourse.psychopy.org/t/attributeerror-str-object-has-no-attribute-contains/44823)

<div class="topic-metadata">

**Author:** [@Jonay\_Acosta](https://discourse.psychopy.org/u/Jonay_Acosta)\
**Replies:** 15\
**Last updated:** [June 7, 2025, 8:23am UTC](https://discourse.psychopy.org/t/attributeerror-str-object-has-no-attribute-contains/44823 "2025-06-07T08:23:11Z")

</div>

Hi everyone, I’m reaching out for help with an issue I’m having in PsychoPy. OS Win10 PsychoPy version 2024.2.4 Py 3.8 Standard Standalone Installation? Yes Do you want it to also run online? Yes What are you tryin…

---

## [How do I get mouse response for a 4\*4 dot matrix pattern?](https://discourse.psychopy.org/t/how-do-i-get-mouse-response-for-a-4-4-dot-matrix-pattern/34296)

<div class="topic-metadata">

**Author:** [@parka](https://discourse.psychopy.org/u/parka)\
**Replies:** 3\
**Last updated:** [April 24, 2025, 1:31pm UTC](https://discourse.psychopy.org/t/how-do-i-get-mouse-response-for-a-4-4-dot-matrix-pattern/34296 "2025-04-24T13:31:04Z")

</div>

I am trying to create a visuospatial short term memory task where the participant will be presented with a pattern of dots in a 4\*4 matrix for about 1 second which they have to memorize. After a gap of about 2 seconds, t…

---

## [Use color of clicked stimulus as color of next stimulus](https://discourse.psychopy.org/t/use-color-of-clicked-stimulus-as-color-of-next-stimulus/43290)

<div class="topic-metadata">

**Author:** [@Caro\_86](https://discourse.psychopy.org/u/Caro_86)\
**Replies:** 1\
**Last updated:** [December 15, 2024, 10:14pm UTC](https://discourse.psychopy.org/t/use-color-of-clicked-stimulus-as-color-of-next-stimulus/43290 "2024-12-15T22:14:30Z")

</div>

OS : MacOS Monterey PsychoPy version: Builder (2021.2.4) Standard Standalone? (y/n): Yes What are you trying to achieve?: I have a simple task, where a number of circles with different colors appear on the screen. Th…

---

## [Repeating missed trials](https://discourse.psychopy.org/t/repeating-missed-trials/42935)

<div class="topic-metadata">

**Author:** [@Zelal\_Gulbahce](https://discourse.psychopy.org/u/Zelal_Gulbahce)\
**Replies:** 22\
**Last updated:** [November 29, 2024, 10:25pm UTC](https://discourse.psychopy.org/t/repeating-missed-trials/42935 "2024-11-29T22:25:34Z")

</div>

URL of experiment: Description of the problem: Hello, I am trying to repeat a set of trials when a response has been missed. I used the same logic as the one in the repeat subset demo provided by wake carter. Specifi…

---

## [If obj.contains(mouse): AttributeError: 'str' object has no attribute 'contains'](https://discourse.psychopy.org/t/if-obj-contains-mouse-attributeerror-str-object-has-no-attribute-contains/42848)

<div class="topic-metadata">

**Author:** [@zyadelmahdy](https://discourse.psychopy.org/u/zyadelmahdy)\
**Replies:** 19\
**Last updated:** [November 20, 2024, 7:58pm UTC](https://discourse.psychopy.org/t/if-obj-contains-mouse-attributeerror-str-object-has-no-attribute-contains/42848 "2024-11-20T19:58:35Z")

</div>

If this template helps then use it. If not then just delete and start from scratch. OS (e.g. Win10): MacOS Sequoia 15.1 PsychoPy version (e.g. 1.84.x): v.2024.1.5 Standard Standalone? (y/n) If not then what?: y What…

---

## [To measure the hold length on the stimuli without showing the feedback](https://discourse.psychopy.org/t/to-measure-the-hold-length-on-the-stimuli-without-showing-the-feedback/42943)

<div class="topic-metadata">

**Author:** [@zyadelmahdy](https://discourse.psychopy.org/u/zyadelmahdy)\
**Replies:** 7\
**Last updated:** [November 18, 2024, 1:42pm UTC](https://discourse.psychopy.org/t/to-measure-the-hold-length-on-the-stimuli-without-showing-the-feedback/42943 "2024-11-18T13:42:35Z")

</div>

If this template helps then use it. If not then just delete and start from scratch. OS (e.g. Win10): MacOS Sequoia 15.1 PsychoPy version (e.g. 1.84.x): v2024.1.5 Standard Standalone? (y/n) If not then what?: y What …

---

## [Noob question: .rt measurements in the output file](https://discourse.psychopy.org/t/noob-question-rt-measurements-in-the-output-file/22741)

<div class="topic-metadata">

**Author:** [@lusuperbia](https://discourse.psychopy.org/u/lusuperbia)\
**Replies:** 9\
**Last updated:** [September 28, 2024, 3:08am UTC](https://discourse.psychopy.org/t/noob-question-rt-measurements-in-the-output-file/22741 "2024-09-28T03:08:02Z")

</div>

Hi guys, I have a very basic doubt, thank you in advance if anyone can help. I created a color recognition task entirely using the Builder. The participants must respond via mouse clicks and the program registers their …

---

## [Hide mouse cursor in builder?](https://discourse.psychopy.org/t/hide-mouse-cursor-in-builder/1782)

<div class="topic-metadata">

**Author:** [@jashubbard](https://discourse.psychopy.org/u/jashubbard)\
**Replies:** 14\
**Last updated:** [May 16, 2024, 12:08am UTC](https://discourse.psychopy.org/t/hide-mouse-cursor-in-builder/1782 "2024-05-16T00:08:13Z")

</div>

I have an experiment where subjects respond with the mouse only at the end of each trial. I have a separate routine for this response period, which includes a mouse event. The problem is, the mouse cursor is displayed th…

---

## [Touchscreen doesn't work even with the 'contains' function](https://discourse.psychopy.org/t/touchscreen-doesnt-work-even-with-the-contains-function/40910)

<div class="topic-metadata">

**Author:** [@Qihui\_Xu](https://discourse.psychopy.org/u/Qihui_Xu)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 12:49pm UTC](https://discourse.psychopy.org/t/touchscreen-doesnt-work-even-with-the-contains-function/40910 "2024-08-13T12:49:41Z")

</div>

Hi everyone, I have a function that runs a simple fish-catching game. In this game, a fish appears in a random position each time, and participants need to \[single\] tap the fish on the touchscreen to move on to the next…

---

## [mouse.setPos(newPos=(0,0)) not working in Ubuntu 22.04.4](https://discourse.psychopy.org/t/mouse-setpos-newpos-0-0-not-working-in-ubuntu-22-04-4/41027)

<div class="topic-metadata">

**Author:** [@dwbatten](https://discourse.psychopy.org/u/dwbatten)\
**Replies:** 0\
**Last updated:** [August 8, 2024, 3:07pm UTC](https://discourse.psychopy.org/t/mouse-setpos-newpos-0-0-not-working-in-ubuntu-22-04-4/41027 "2024-08-08T15:07:51Z")

</div>

OS (e.g. Win10): Ubuntu 22.04.4 PsychoPy version (e.g. 1.84.x): 2024.2.0 What are you trying to achieve?: I am trying to have the mouse position reset to a dock at the beginning of a trial. I’ve put together a minimal…

---

## [Disable touch screen](https://discourse.psychopy.org/t/disable-touch-screen/23614)

<div class="topic-metadata">

**Author:** [@plonskipe](https://discourse.psychopy.org/u/plonskipe)\
**Replies:** 12\
**Last updated:** [July 14, 2024, 5:44pm UTC](https://discourse.psychopy.org/t/disable-touch-screen/23614 "2024-07-14T17:44:15Z")

</div>

Question: Is there a way to disable the touch screen? I’d like participants to use a mouse or trackpad for an online study.

---

## [Mouse Response: Experiment exits on click](https://discourse.psychopy.org/t/mouse-response-experiment-exits-on-click/10908)

<div class="topic-metadata">

**Author:** [@mariee](https://discourse.psychopy.org/u/mariee)\
**Replies:** 30\
**Last updated:** [June 17, 2024, 3:17pm UTC](https://discourse.psychopy.org/t/mouse-response-experiment-exits-on-click/10908 "2024-06-17T15:17:27Z")

</div>

I’m trying to build an experiment with a mouse response. There are two text fields that are automatically generated from the excel list. People hear a sound and have to click on one of the words. So far that works, but …

---

## [Labels are not appearing on slider](https://discourse.psychopy.org/t/labels-are-not-appearing-on-slider/33080)

<div class="topic-metadata">

**Author:** [@Zelal\_Gulbahce](https://discourse.psychopy.org/u/Zelal_Gulbahce)\
**Replies:** 2\
**Last updated:** [June 11, 2024, 9:38am UTC](https://discourse.psychopy.org/t/labels-are-not-appearing-on-slider/33080 "2024-06-11T09:38:50Z")

</div>

Hello, I have included labels for each value of a slider. However, the labels are not appearing. Please see the screenshots below.

---

## [Detecting bilateral RTs from mouse clicks](https://discourse.psychopy.org/t/detecting-bilateral-rts-from-mouse-clicks/40277)

<div class="topic-metadata">

**Author:** [@sauro](https://discourse.psychopy.org/u/sauro)\
**Replies:** 3\
**Last updated:** [June 7, 2024, 8:12am UTC](https://discourse.psychopy.org/t/detecting-bilateral-rts-from-mouse-clicks/40277 "2024-06-07T08:12:41Z")

</div>

I’m using the current standalone version of PsychoPy on Windows 11, . I would like to record the reaction times (RT) from presses of both the right and left mouse buttons independently. According to this link, the time …

---

## [Builder to JS mouse declaration change needed](https://discourse.psychopy.org/t/builder-to-js-mouse-declaration-change-needed/39447)

<div class="topic-metadata">

**Author:** [@Flavio](https://discourse.psychopy.org/u/Flavio)\
**Replies:** 2\
**Last updated:** [April 4, 2024, 4:18pm UTC](https://discourse.psychopy.org/t/builder-to-js-mouse-declaration-change-needed/39447 "2024-04-04T16:18:59Z")

</div>

In order to run experiment in pavlovia, I had to change mouse = new psychoJS.eventManager.Mouse({“win”: psychoJS.window}); to mouse = new core.Mouse({win: psychoJS.window});

---

## [Questions about mouse click/](https://discourse.psychopy.org/t/questions-about-mouse-click/39180)

<div class="topic-metadata">

**Author:** [@Skylar](https://discourse.psychopy.org/u/Skylar)\
**Replies:** 3\
**Last updated:** [March 19, 2024, 8:21am UTC](https://discourse.psychopy.org/t/questions-about-mouse-click/39180 "2024-03-19T08:21:30Z")

</div>

in ‘each frame’, I wrote the codes like:cnt was initialized to 0 in ‘start of the routine’ print(“itsss”,cnt) cnt+=1 for num in numbers: if mouse\_player.isPressedIn(num): print(‘num is’,num) cnt-=1 if\_clicked = Tr…

---

## [Getting out of while drawing loop with mouse press](https://discourse.psychopy.org/t/getting-out-of-while-drawing-loop-with-mouse-press/35291)

<div class="topic-metadata">

**Author:** [@Izabela\_M\_Sztuka](https://discourse.psychopy.org/u/Izabela_M_Sztuka)\
**Replies:** 3\
**Last updated:** [February 23, 2024, 10:33am UTC](https://discourse.psychopy.org/t/getting-out-of-while-drawing-loop-with-mouse-press/35291 "2024-02-23T10:33:43Z")

</div>

Hello, I need a help to finish my psychopy code. The following code opens a psychopy window and waits for the mouse to be clicked. Once it is clicked it draws the path with the mouse cursor. However, I don’t seem to be …

---

## [Mouse Exclusivity issues with extended 2 Monitor setup and 2 Windows defined](https://discourse.psychopy.org/t/mouse-exclusivity-issues-with-extended-2-monitor-setup-and-2-windows-defined/38134)

<div class="topic-metadata">

**Author:** [@jshagouv](https://discourse.psychopy.org/u/jshagouv)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 6:49pm UTC](https://discourse.psychopy.org/t/mouse-exclusivity-issues-with-extended-2-monitor-setup-and-2-windows-defined/38134 "2024-01-09T18:49:37Z")

</div>

I’m running PsychoPy 2023.2.3 and Coder.I’ve confirmed the pyglet package is installed (1.4.11). I’ve run into an issue where mouse exclusivity settings are being ignored when I attempt to use a 2 monitor, extended disp…

---

## [Response (mouse) is not recorded/noticed/taken after a specific amount of trials](https://discourse.psychopy.org/t/response-mouse-is-not-recorded-noticed-taken-after-a-specific-amount-of-trials/38125)

<div class="topic-metadata">

**Author:** [@JoSc](https://discourse.psychopy.org/u/JoSc)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 10:28am UTC](https://discourse.psychopy.org/t/response-mouse-is-not-recorded-noticed-taken-after-a-specific-amount-of-trials/38125 "2024-01-09T10:28:35Z")

</div>

Hi, I am programming a behavioural experiment with psychopy. I have objects and a room which I display on every trial. Everything goes smoothly when I for example use 24 trials and 4 blocks. However, when I increase the…

---

## [Clickable words on a tex/textbox obj](https://discourse.psychopy.org/t/clickable-words-on-a-tex-textbox-obj/37534)

<div class="topic-metadata">

**Author:** [@mikan](https://discourse.psychopy.org/u/mikan)\
**Replies:** 2\
**Last updated:** [November 13, 2023, 1:56pm UTC](https://discourse.psychopy.org/t/clickable-words-on-a-tex-textbox-obj/37534 "2023-11-13T13:56:19Z")

</div>

Win10 PsychoPy version 2023.2.3 Standard Standalone let’s consider that we have this paragraph: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna ali…

---

## [Mouse Component: Need help with RTs](https://discourse.psychopy.org/t/mouse-component-need-help-with-rts/36706)

<div class="topic-metadata">

**Author:** [@hulyaaldemir](https://discourse.psychopy.org/u/hulyaaldemir)\
**Replies:** 0\
**Last updated:** [October 4, 2023, 8:23pm UTC](https://discourse.psychopy.org/t/mouse-component-need-help-with-rts/36706 "2023-10-04T20:23:48Z")

</div>

OS (e.g. Win10): \*\*PsychoPy Builder version: v2023.1.3 \*\*What are you trying to achieve?: I am relatively new to PsychoPy and using builder for a task where my participants need to click on three words, one of them bei…

---

## [Moving Circle Object Around an Arc Using Mouse](https://discourse.psychopy.org/t/moving-circle-object-around-an-arc-using-mouse/36495)

<div class="topic-metadata">

**Author:** [@Curtis\_Rogers](https://discourse.psychopy.org/u/Curtis_Rogers)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 3:17am UTC](https://discourse.psychopy.org/t/moving-circle-object-around-an-arc-using-mouse/36495 "2023-09-20T03:17:23Z")

</div>

I am currently trying to use the mouse component as both a response and to move a circle object around an arc based on the mouse position on screen. See image below: The word and circle I want to move about the black…

---

## [Mouse click getPos() function not updating with each new click](https://discourse.psychopy.org/t/mouse-click-getpos-function-not-updating-with-each-new-click/36389)

<div class="topic-metadata">

**Author:** [@drewjmclaughlin](https://discourse.psychopy.org/u/drewjmclaughlin)\
**Replies:** 2\
**Last updated:** [September 13, 2023, 1:51pm UTC](https://discourse.psychopy.org/t/mouse-click-getpos-function-not-updating-with-each-new-click/36389 "2023-09-13T13:51:20Z")

</div>

I am using mouse clicks as part of a visual world paradigm (VWP) experiment, but running into issues with the x and y coordinate information of clicks on each trial. I will put the most relevant code below as I describe…

---

## [Issues with collecting data from mouse clicks](https://discourse.psychopy.org/t/issues-with-collecting-data-from-mouse-clicks/36028)

<div class="topic-metadata">

**Author:** [@Tsach](https://discourse.psychopy.org/u/Tsach)\
**Replies:** 2\
**Last updated:** [August 9, 2023, 9:13pm UTC](https://discourse.psychopy.org/t/issues-with-collecting-data-from-mouse-clicks/36028 "2023-08-09T21:13:38Z")

</div>

OS (Win11) PsychoPy version (2022.2.4) Standard Standalone What are you trying to achieve? I have a loop (28 items), which on every routine the participent needs to choose between 4 stimulies with mouse click. I nee…

---

## [New mouse options - images as buttons](https://discourse.psychopy.org/t/new-mouse-options-images-as-buttons/2951)

<div class="topic-metadata">

**Author:** [@jon](https://discourse.psychopy.org/u/jon)\
**Replies:** 7\
**Last updated:** [August 1, 2023, 9:14pm UTC](https://discourse.psychopy.org/t/new-mouse-options-images-as-buttons/2951 "2023-08-01T21:14:09Z")

</div>

Hi there, I’ve just added a new feature into the repository to make it easier for people to use visual stimuli (images, shapes, gratings, movies…) as virtual buttons. For a long time we’ve had the option to use code and…

---

## [How can I simulate a mouse click with a keyboard press?](https://discourse.psychopy.org/t/how-can-i-simulate-a-mouse-click-with-a-keyboard-press/35326)

<div class="topic-metadata">

**Author:** [@Zark](https://discourse.psychopy.org/u/Zark)\
**Replies:** 2\
**Last updated:** [June 24, 2023, 8:01pm UTC](https://discourse.psychopy.org/t/how-can-i-simulate-a-mouse-click-with-a-keyboard-press/35326 "2023-06-24T20:01:06Z")

</div>

aGame2.py (2.3 KB) So I am trying to simulate a mouse clicks. The goal is to do it based on an EMG/EEG, but im trying to build a better understanding of pyschopy first. Right now Im trying to make the program treat a ke…

---

## [Make stimulus follow mouse during experiment](https://discourse.psychopy.org/t/make-stimulus-follow-mouse-during-experiment/34494)

<div class="topic-metadata">

**Author:** [@Mone](https://discourse.psychopy.org/u/Mone)\
**Replies:** 0\
**Last updated:** [April 21, 2023, 9:28am UTC](https://discourse.psychopy.org/t/make-stimulus-follow-mouse-during-experiment/34494 "2023-04-21T09:28:52Z")

</div>

OS : MacOS Montery 12.5 PsychoPy version : v2002.2.5 \*\*Standard Standalone? \*\* : y What are you trying to achieve?: I would like to be able to make a stimulus (circle) follow the movement of my cursor while running t…

[Next page](https://discourse.psychopy.org/tag/mouse/11.md?match_all_tags=true&page=1&tags%5B%5D=mouse)
