Skip to content

Map macOS OtherMouse buttons#187

Open
h2cone wants to merge 1 commit into
Narsil:mainfrom
h2cone:macos-other-mouse-buttons
Open

Map macOS OtherMouse buttons#187
h2cone wants to merge 1 commit into
Narsil:mainfrom
h2cone:macos-other-mouse-buttons

Conversation

@h2cone

@h2cone h2cone commented May 3, 2026

Copy link
Copy Markdown

Summary

This maps macOS OtherMouseDown and OtherMouseUp events to Button::Middle or Button::Unknown(code) instead of dropping them in listen / grab.

It also maps OtherMouseDragged to MouseMove, matching the existing behavior for LeftMouseDragged and RightMouseDragged.

Why

CoreGraphics reports non-left/right mouse buttons through OtherMouse* events. The button number follows Apple’s CGMouseButton convention:

  • 0 = left
  • 1 = right
  • 2 = center/middle
  • remaining buttons are device-specific

rdev already exposes Button::Unknown(u8) for extra mouse buttons, and Windows/Linux X11 already surface these kinds of buttons.

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