Skip to content

fix(mouse): work around Ghostty false motion press bug - #1051

Merged
gdamore merged 1 commit into
gdamore:mainfrom
noborus:resolve-1045
Apr 7, 2026
Merged

gdamore merged 1 commit into
gdamore:mainfrom
noborus:resolve-1045

Conversation

@noborus

@noborus noborus commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Ghostty may emit mouse motion events that incorrectly indicate a button is pressed even when no corresponding press occurred. Ignore those packets to avoid creating a synthetic button-down state.

Ghostty may emit mouse motion events that incorrectly indicate a button
is pressed even when no corresponding press occurred. Ignore those
packets to avoid creating a synthetic button-down state.
@noborus
noborus requested a review from gdamore as a code owner April 6, 2026 23:35
@noborus

noborus commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

This change is a workaround for the Ghostty bug described in #1045. My main goal is not necessarily to have this PR merged, but rather to see the issue properly fixed on the Ghostty side: https://github.com/ghostty-org/ghostty/discussions/12078

@codecov

codecov Bot commented Apr 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.18%. Comparing base (0387a59) to head (2cfd4df).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
input.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1051      +/-   ##
==========================================
- Coverage   86.27%   86.18%   -0.10%     
==========================================
  Files          46       46              
  Lines        5057     5060       +3     
==========================================
- Hits         4363     4361       -2     
- Misses        537      539       +2     
- Partials      157      160       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gdamore gdamore left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we had logic like this that I may have dropped in the past.

@gdamore
gdamore merged commit 14b46da into gdamore:main Apr 7, 2026
8 of 10 checks passed
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.

2 participants