Expand description
Selection modifiers: Cmd/Ctrl primary, macOS Ctrl+click = secondary, list ranges. Selection modifiers, one meaning on every platform (multi-select rework, owner 2026-11-26).
- The PRIMARY modifier is Cmd on macOS and Ctrl on Windows/Linux. egui’s
Modifiers::commandis not enough on its own: the native (egui-winit) runner sets it to Cmd on macOS, but eframe’s WEB runner sets it toctrl || metaon every OS, so a Mac browser’s Ctrl+click would read as a primary click. On macOS the primary modifier is thereforemac_cmd. - On macOS a Ctrl+click is the secondary (right) click, and a Ctrl+drag is
a right drag (pan).
MacSecondary::rewriteturns those button events into secondary-button events in the raw input, once, before any widget sees them — so every context menu,secondary_clicked()anddragged_by(Secondary)path behaves as it does for a real right button, natively and in the browser build, and Ctrl never adds to a selection. - Shift means “more”: in the 3D view Shift+click adds/toggles like the
primary modifier; in ordered lists (feature tree, assembly tree, BOM)
Shift+click selects the RANGE from the anchor row (
range).
Structs§
- MacSecondary
- The macOS Ctrl+click → secondary click rewrite (see the module docs). One per app: it remembers which presses it turned so their releases match even when Ctrl is let go first.
Enums§
- RowClick
- How an ordered list row click applies (feature tree, assembly tree, BOM).
Functions§
- additive
- Whether a click adds to (toggles in) the 3D selection: the primary modifier or Shift.
- primary
- Whether the PRIMARY modifier (Cmd on macOS, Ctrl elsewhere) is held.
- primary_
in primaryfor the context’s OS.- range
- The rows from
anchortoclickedinclusive, in display order, orNonewhen either is not inrows(the anchor row is gone: the caller selects the clicked row alone). - rewrite_
raw - Apply
MacSecondary::rewriteto a frame’s raw input, keeping its state in the context (one per window). Every host calls it after its own input is inraw: the app’sraw_input_hookand the headless MCP host.