mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 14:49:07 -04:00
Document potential user expectation of ctrl+left click behavior on macOS. (#4518)
This commit is contained in:
@@ -516,6 +516,19 @@ impl From<PointerSource> for PointerKind {
|
|||||||
/// system.
|
/// system.
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub enum ButtonSource {
|
pub enum ButtonSource {
|
||||||
|
/// ## Platform-specific
|
||||||
|
///
|
||||||
|
/// ### macOS
|
||||||
|
///
|
||||||
|
/// Users may expect holding [<kbd>CTRL</kbd>](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
|
||||||
|
/// [<kbd>CTRL</kbd>](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),
|
Mouse(MouseButton),
|
||||||
/// See [`PointerSource::Touch`] for more details.
|
/// See [`PointerSource::Touch`] for more details.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user