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/macos | |
| 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/macos')
| -rw-r--r-- | src/macos/Sources/PardesView.swift | 1 | ||||
| -rw-r--r-- | src/macos/pardes.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/macos/Sources/PardesView.swift b/src/macos/Sources/PardesView.swift index 8ba9c84b..4ea4475a 100644 --- a/src/macos/Sources/PardesView.swift +++ b/src/macos/Sources/PardesView.swift @@ -562,6 +562,7 @@ private func modifiers(_ flags: NSEvent.ModifierFlags) -> UInt32 { if flags.contains(.control) { mods |= UInt32(PARDES_MOD_CTRL) } if flags.contains(.option) { mods |= UInt32(PARDES_MOD_ALT) } if flags.contains(.shift) { mods |= UInt32(PARDES_MOD_SHIFT) } + if flags.contains(.command) { mods |= UInt32(PARDES_MOD_SUPER) } return mods } diff --git a/src/macos/pardes.h b/src/macos/pardes.h index 46453429..33db3bb5 100644 --- a/src/macos/pardes.h +++ b/src/macos/pardes.h @@ -141,6 +141,8 @@ typedef struct { #define PARDES_MOD_CTRL 0x0001u #define PARDES_MOD_ALT 0x0002u #define PARDES_MOD_SHIFT 0x0004u +// Command. Only a click reads it (Cmd-click is B3); a Command key chord never reaches the core. +#define PARDES_MOD_SUPER 0x0008u // Keys that carry no text. The four editing keys are their ASCII controls; // everything else lives in a private-use plane so it can never collide with a |
