fix: prevent stuck left mouse button in After Effects - #1004
Open
denizercealagoz wants to merge 1 commit into
Open
fix: prevent stuck left mouse button in After Effects#1004denizercealagoz wants to merge 1 commit into
denizercealagoz wants to merge 1 commit into
Conversation
denizercealagoz
marked this pull request as ready for review
August 5, 2026 02:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Mos 4.0.2 installs a mutable global event tap for mouse-button events. Current master already moved primary clicks out of the mutable dispatch tap, but it still installs a separate listen-only tap whose callback only returns the original event.
Applications with their own drag state machines, notably Adobe After Effects, have been reported to enter a stuck left-click state while Mos is running. Since Mos does not record an unmodified primary click and the observation callback has no behavior, subscribing to those events adds input-path risk without providing functionality.
This change removes that remaining primary-button tap so Mos never observes or rewrites physical left/right clicks through ButtonCore.
Addresses #843.
Validation
git diff --checkxcrun swiftc -parse Mos/ButtonCore/ButtonCore.swift MosTests/InputProcessorTests.swiftxcodebuild -scheme Debug -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO buildxcodebuild -scheme Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test -only-testing:MosTests/InputProcessorTests— 48 tests passed with 0 failurestestButtonCore_dispatchEventMask_excludesPrimaryMouseButtonsregression coverage passedAdditional maintainer/community verification on other macOS and After Effects versions is welcome.