Skip to content

fix: handle macOS gesture button in event tap#42

Open
thisislvca wants to merge 1 commit intomasterfrom
codex/fix-macos-gesture-button
Open

fix: handle macOS gesture button in event tap#42
thisislvca wants to merge 1 commit intomasterfrom
codex/fix-macos-gesture-button

Conversation

@thisislvca
Copy link
Copy Markdown
Collaborator

@thisislvca thisislvca commented Mar 23, 2026

Summary

Handle the MX gesture/action button on macOS when it comes through the CGEvent tap as button 6.

Changes

  • add a macOS _BTN_GESTURE = 6 mapping in core/mouse_hook.py
  • route button 6 down/up events into the existing gesture handlers
  • block the raw OS event so the button does not fall through unhandled
  • add regression coverage for the darwin event-tap path in tests/test_mouse_hook.py

Validation

  • python3 -m unittest tests.test_mouse_hook
  • python3 -m unittest discover -s tests

Context

This is a follow-up to the MX Master 4 detection work merged in #38, but it is scoped to the macOS mouse-hook path only.

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