# Touch input unreliable in PsychoPy (pyglet) on Windows 11 touch monitor

**URL:** <https://discourse.psychopy.org/t/touch-input-unreliable-in-psychopy-pyglet-on-windows-11-touch-monitor/47450>\
**Category:** Builder\
**Created:** [July 10, 2026, 9:01am UTC](https://discourse.psychopy.org/t/touch-input-unreliable-in-psychopy-pyglet-on-windows-11-touch-monitor/47450 "2026-07-10T09:01:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heegoo\_kim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/heegoo_kim/32/46615_2.png) [@heegoo\_kim](https://discourse.psychopy.org/u/heegoo_kim)\
**Post date:** [July 10, 2026, 9:01am UTC](https://discourse.psychopy.org/t/touch-input-unreliable-in-psychopy-pyglet-on-windows-11-touch-monitor/47450/1 "2026-07-10T09:01:49Z")

</div>

\*\*OS\*\*: Windows 11 Pro  
\*\*PsychoPy version\*\*: tested on 2024.1.5 and 2026.1.3 (issue persists on both)  
\*\*Standard Standalone\*\*: Yes

I’m running a Corsi block-tapping working memory task (Builder, code  
component using event.Mouse for touch response) for a clinical population  
(stroke/elderly patients), synchronized with fNIRS via LSL markers. Touch  
monitor is connected via USB (touch) + HDMI (video), mirrored display.

\*\*Symptom\*\*: Touch recognition inside PsychoPy (pyglet backend) is very  
unreliable — taps are frequently missed or not registered, even though:

- The touchscreen works perfectly as a mouse in every other Windows app  
(Windows confirms “Pen and 10 touch points supported”)
- Mouse clicks work reliably \*inside\* PsychoPy

\*\*What I’ve tried\*\*:

1. pyglet backend (default) — unreliable touch recognition
2. glfw backend — ImportError, module not installed in standalone build
3. pygame backend — TypeError, PygameBackend abstract class not fully  
implemented (missing getMousePos, onMouseButton, etc.)
4. ioHub (io.devices.mouse) — intermittent silent hangs when accessing  
mouse events in a Builder code component
5. tkinter overlay window running alongside the PsychoPy window in the  
same process — hangs completely (confirmed tkinter itself works fine  
standalone, so this looks like a pyglet/tkinter Win32 message pump  
deadlock)
6. Updated PsychoPy 2024.1.5 → 2026.1.3 — issue persists identically

I found this related thread confirming the same root cause:

> [@Make PsychoPy builder detect touchscreen](https://discourse.psychopy.org/t/make-psychopy-builder-detect-touchscreen/39577/4):
>
> Got the solution. To whoever has issues: The touchscreen only works with the Javascript (local or pavlovia in browser) backend. DO NOT USE THE PYTHON BACKEND IF YOU WANT PROPER TOUCH CONTROLS. By proper I mean, no double tap or stroking. The browser version just works.

(“touchscreen only works with the Javascript (local or pavlovia) backend”)

Given this, I’m planning to move only the touch-response routine to a  
local browser window (PsychoJS/localhost) and bridge the response back  
to the Python process via WebSocket, keeping stimulus presentation and  
LSL marker sending in Python. Before I invest the time — is this  
considered the standard/recommended workaround for local (non-Pavlovia)  
studies needing touch + LSL synchronization? Any known pitfalls with  
this hybrid Python+local-JS approach, or a simpler officially-supported  
path I’m missing?

Happy to share code/tracebacks on request.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [July 10, 2026, 9:31am UTC](https://discourse.psychopy.org/t/touch-input-unreliable-in-psychopy-pyglet-on-windows-11-touch-monitor/47450/2 "2026-07-10T09:31:45Z")

</div>

This is an issue I’ve had for 20 years (longer than I’ve been using PsychoPy – I first encountered it in SuperLab). Personally I would recommend the contains method for local touchscreens, rather than attempt some form of hybrid experiment.

> **[PsychoPy Code Component Snippets](https://docs.google.com/document/d/1kclYKgpbOCT3X8_O5pQOEIQHvD6zqMyxz3IKv3-K73I/edit?tab=t.0#heading=h.3zwdjo3b0zou)**
>
> PsychoPy version 2020.2.10Code Component Snippets Compiled by Wakefield Morys-Carter, Oxford Brookes UniversityPlease share widely and follow Psych\_Stats on twitter. Code components should be Auto Py-\>JS unless code has been added to the PsychoJS...

---

<div class="post-metadata">

**Author:** ![heegoo\_kim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/heegoo_kim/32/46615_2.png) [@heegoo\_kim](https://discourse.psychopy.org/u/heegoo_kim)\
**Post date:** [July 13, 2026, 5:44am UTC](https://discourse.psychopy.org/t/touch-input-unreliable-in-psychopy-pyglet-on-windows-11-touch-monitor/47450/3 "2026-07-13T05:44:47Z")

</div>

Thank you so much — this fixed it completely!

For context: I’m running a Corsi-like visuospatial span task (Builder,  
fNIRS-synced via LSL) with a Windows touch monitor, and had tried  
pyglet, glfw, pygame, and ioHub, all with unreliable or non-functional  
touch. Switching from mouse.isPressedIn()/getPressed() to the  
hover-based position-change detection you described worked  
immediately and reliably — single taps register correctly with no  
double-tap or stroke needed.

Really appreciate you sharing this after dealing with it for 20 years.  
This will save a lot of people a lot of debugging time. Thank you!
