Skip to content

fix: prevent stuck left mouse button in After Effects - #1004

Open
denizercealagoz wants to merge 1 commit into
Caldis:masterfrom
denizercealagoz:agent/fix-after-effects-stuck-click
Open

fix: prevent stuck left mouse button in After Effects#1004
denizercealagoz wants to merge 1 commit into
Caldis:masterfrom
denizercealagoz:agent/fix-after-effects-stuck-click

Conversation

@denizercealagoz

@denizercealagoz denizercealagoz commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • stop installing the no-op global event tap for primary mouse button events
  • keep left/right mouse down and up events outside ButtonCore entirely
  • retain the regression assertion that primary buttons are excluded from the dispatch mask

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 --check
  • xcrun swiftc -parse Mos/ButtonCore/ButtonCore.swift MosTests/InputProcessorTests.swift
  • xcodebuild -scheme Debug -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build
  • xcodebuild -scheme Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO test -only-testing:MosTests/InputProcessorTests — 48 tests passed with 0 failures
  • existing testButtonCore_dispatchEventMask_excludesPrimaryMouseButtons regression coverage passed
  • runtime check on macOS 26.2 with Adobe After Effects 26.3.0: no stuck click observed during approximately 10–17 minutes of timeline/composition dragging and normal editing

Additional maintainer/community verification on other macOS and After Effects versions is welcome.

@denizercealagoz denizercealagoz changed the title fix(buttons): stop observing primary mouse clicks fix: prevent stuck left mouse button in After Effects Aug 4, 2026
@denizercealagoz
denizercealagoz marked this pull request as ready for review August 5, 2026 02:29
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