Skip to content

Fix gh-5894: Mouse capture issues on Windows #6018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fancidev
Copy link
Contributor

@fancidev fancidev commented Aug 4, 2025

#5894 reports that when running a Textual app under Windows Terminal with mouse=False, the console gets polluted with garbage characters when the mouse is moved during and after the app's execution.

The issue is caused by an extraneous line in Textual's Windows driver. That line enables mouse support regardless of the mouse flag. However, mouse inputs are not handled when mouse=False; nor does the clean-up routine disable the mouse support when mouse=False. As a result, control sequences that encode mouse events are treated as regular input, and the screen gets polluted.

This PR fixes the issue by removing that extraneous line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant