diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 12:44:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 12:58:23 -0300 |
| commit | 8eeab5df9c09caafc07c93c2fc3baf6e6700afed (patch) | |
| tree | a35f70177414e360010f36abb62cb05eabd285d5 /src/web.zig | |
| parent | a99edf403dbcebae2ce557e2ba39078ffe876a92 (diff) | |
| download | pardes-8eeab5df9c09caafc07c93c2fc3baf6e6700afed.tar.gz pardes-8eeab5df9c09caafc07c93c2fc3baf6e6700afed.zip | |
Alt/Option-click is B2 and Super/Cmd-click is B3, sweeps included, as in plan9port: a one-button trackpad can execute and look
The core decides it at the press (mouse.emulateButton) and keeps it to the
release, whatever keys are let go between. Ctrl-click stays a definition,
and a program tracking the mouse still gets the plain click (Alt as its
meta, Super as nothing). The SDL, macOS and web shells now pass Super; the
macOS and web shells pass Alt on a click too. A terminal's mouse report has
no Super bit, so in a terminal only Alt-click is B2.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/web.zig')
| -rw-r--r-- | src/web.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/web.zig b/src/web.zig index ac0ecbbf..fed2ba5a 100644 --- a/src/web.zig +++ b/src/web.zig @@ -266,6 +266,9 @@ fn mouseWithHit(button_arg: u32, kind_arg: u32, col_arg: u32, row_arg: u32, mods .col = @intCast(@min(col_arg, std.math.maxInt(u16))), .row = @intCast(@min(row_arg, std.math.maxInt(u16))), .ctrl = mods & 1 != 0, + // Alt-click is B2 and Cmd/Super-click B3 (mouse.emulateButton). + .alt = mods & 2 != 0, + .super = mods & 8 != 0, } }); } |
