From 99755ee15a1ebb1873cb3f08ba4a7f6c5cb7fcd1 Mon Sep 17 00:00:00 2001 From: Mira Dobrovolskaya Date: Mon, 4 Nov 2024 16:01:18 +0300 Subject: [PATCH 1/2] docs: add explanation for mouse button event modifiers --- src/guide/essentials/event-handling.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/guide/essentials/event-handling.md b/src/guide/essentials/event-handling.md index e7d95a649e..c6b088548f 100644 --- a/src/guide/essentials/event-handling.md +++ b/src/guide/essentials/event-handling.md @@ -357,3 +357,7 @@ The `.exact` modifier allows control of the exact combination of system modifier - `.middle` These modifiers restrict the handler to events triggered by a specific mouse button. + +::: tip Note +`.left`, `.right`, and `.middle` modifier names are based on the typical right-handed mouse layout, but in fact represent "main", "secondary", and "auxiliary" pointing device event triggers, respectively, and not the actual physical buttons. So that for a left-handed mouse layout the "main" button might physically be the right one but would trigger the `.left` modifier handler. Or a trackpad might trigger the `.left` handler with a one-finger tap, the `.right` handler with a two-finger tap, and the `.middle` handler with a three-finger tap. Similarly, other devices and event sources generating "mouse" events might have trigger modes that are not related to "left" and "right" whatsoever. +::: From d4fa55f1f892cf4c56d6090ea7cd6b83a1a04264 Mon Sep 17 00:00:00 2001 From: Mira Dobrovolskaya Date: Tue, 19 Nov 2024 13:52:27 +0300 Subject: [PATCH 2/2] docs: unwrap mouse button modifiers explanation out of highlighted block --- src/guide/essentials/event-handling.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/guide/essentials/event-handling.md b/src/guide/essentials/event-handling.md index c6b088548f..6d05e77fc9 100644 --- a/src/guide/essentials/event-handling.md +++ b/src/guide/essentials/event-handling.md @@ -358,6 +358,4 @@ The `.exact` modifier allows control of the exact combination of system modifier These modifiers restrict the handler to events triggered by a specific mouse button. -::: tip Note -`.left`, `.right`, and `.middle` modifier names are based on the typical right-handed mouse layout, but in fact represent "main", "secondary", and "auxiliary" pointing device event triggers, respectively, and not the actual physical buttons. So that for a left-handed mouse layout the "main" button might physically be the right one but would trigger the `.left` modifier handler. Or a trackpad might trigger the `.left` handler with a one-finger tap, the `.right` handler with a two-finger tap, and the `.middle` handler with a three-finger tap. Similarly, other devices and event sources generating "mouse" events might have trigger modes that are not related to "left" and "right" whatsoever. -::: +Note, however, that `.left`, `.right`, and `.middle` modifier names are based on the typical right-handed mouse layout, but in fact represent "main", "secondary", and "auxiliary" pointing device event triggers, respectively, and not the actual physical buttons. So that for a left-handed mouse layout the "main" button might physically be the right one but would trigger the `.left` modifier handler. Or a trackpad might trigger the `.left` handler with a one-finger tap, the `.right` handler with a two-finger tap, and the `.middle` handler with a three-finger tap. Similarly, other devices and event sources generating "mouse" events might have trigger modes that are not related to "left" and "right" whatsoever.