From 6f3d763650f1a15a11459177aa0e4372c26b5af6 Mon Sep 17 00:00:00 2001 From: RandomScientist <37155686+Random-Scientist@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:39:12 -0700 Subject: [PATCH] Document potential user expectation of ctrl+left click behavior on macOS. (#4518) --- winit-core/src/event.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/winit-core/src/event.rs b/winit-core/src/event.rs index ce048295e..031fde5c6 100644 --- a/winit-core/src/event.rs +++ b/winit-core/src/event.rs @@ -516,6 +516,19 @@ impl From for PointerKind { /// system. #[derive(Clone, Debug, PartialEq)] pub enum ButtonSource { + /// ## Platform-specific + /// + /// ### macOS + /// + /// Users may expect holding [CTRL](ModifiersState::CONTROL) while + /// clicking [`MouseButton::Left`] to result in a "secondary" click, but the way these + /// clicks behave natively is slightly different from how a physical secondary + /// button press would, depending on the content under the cursor when clicked. If + /// applications want this behavior they should implement it themselves by interpreting + /// [`Left`](MouseButton::Left) clicks as secondary when + /// [CTRL](ModifiersState::CONTROL) is held and their internal logic deems it + /// appropriate for the content under the pointer. + /// See also https://github.com/rust-windowing/winit/issues/4469. Mouse(MouseButton), /// See [`PointerSource::Touch`] for more details. ///