Skip to content

Commit

Permalink
docs: add explanation for mouse button event modifiers (#3090)
Browse files Browse the repository at this point in the history
* docs: add explanation for mouse button event modifiers

* docs: unwrap mouse button modifiers explanation out of highlighted block
  • Loading branch information
midskyey authored Nov 19, 2024
1 parent ce19be8 commit 797839b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/guide/essentials/event-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,5 @@ 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.

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.

0 comments on commit 797839b

Please sign in to comment.