Skip to content

feat(core,gui): allow middle click gesture mode - #1738

Open
PedroDiogo wants to merge 4 commits into
AprilNEA:masterfrom
PedroDiogo:feat/middle-click-gestures
Open

PedroDiogo wants to merge 4 commits into
AprilNEA:masterfrom
PedroDiogo:feat/middle-click-gestures

Conversation

@PedroDiogo

@PedroDiogo PedroDiogo commented Oct 11, 2026 •

Copy link
Copy Markdown

Merge prerequisite

Merge #1380 before this PR. It adds Middle Click to macOS HID++ gesture capture. This PR exposes Middle Click gesture mode in the UI; it does not include that capture fix. Without #1380, the UI can offer gesture mode while gestures still fail on the affected macOS path, including the MX Ergo Bluetooth connection tested here.

The successful hardware test used both changes. Once #1380 lands, rebase this PR onto the updated base before merging.

Summary

Allow Middle Click to enter gesture mode from the Buttons inspector. In 0.8.13, existing middle-click gesture maps are preserved, but the UI prevents creating or re-enabling them.

Changes

  • openlogi-core: permit Middle Click as a gesture source; verify a fresh map retains the native middle-click tap and projects its swipe actions.
  • openlogi-desktop: expose the existing gesture editor for Middle Click; cover creating, editing, disabling, and re-enabling its map.
  • openlogi-agent-core: update the hook documentation to match the supported controls.
  • Update the feature documentation.
middle-click-gestures

Testing

Host: macOS, Apple Silicon; Rust 1.98.0.

Checks previously passed with a temporary fix for an unrelated baseline camera lint (2,024 tests, including doctests):

export RUSTFLAGS="-D warnings"
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agent
cargo xtask ci wasm
cargo xtask ci ast-grep

The unrelated camera fix is excluded from the final diff. On the final tree, workspace Clippy fails on the unchanged openlogi-camera/src/uvc_macos.rs:97 (trivially_copy_pass_by_ref). The contributor authorized skipping only that pre-push Clippy hook to remove the unrelated change; all other applicable hooks, including formatting, ast-grep, and rustdoc, passed. The full test suite and wasm checks above ran before this removal; the gesture code is unchanged.

Hardware: MX Ergo over Bluetooth. With this UI change and the middle-click HID++ ownership change already proposed in #1380, holding Middle Click, rolling the trackball upward, and releasing opened Mission Control. The screenshot is from that combined development build. This PR alone does not claim to fix the macOS sender-less event/capture problem.

To reproduce: select Middle Click in Buttons, enable gesture mode, assign Up to Mission Control, and hold the wheel button while rolling the trackball upward. On the affected macOS path, also apply #1380. Verify that disabling and re-enabling gesture mode preserves the direction assignments.

Windows/Linux hardware and other gesture directions were not runtime-tested.

@PedroDiogo
PedroDiogo marked this pull request as ready for review October 11, 2026 17:38
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge under the author's stated prerequisite.

Summary

Allows Middle Click to enter gesture mode through the Buttons inspector.

  • Middle Click can now trigger actions with hold-and-swipe gestures.

Tests and hardware behavior were not independently run. Visual capture was blocked because the editor is a native GPUI window, not a browser page.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Enable Middle Click gestures] --> B[supports_gesture_mode permits MiddleClick]
  B --> C[Config creates or restores direction map]
  C --> D[Save and reload agent settings]
  D --> E[Existing capture and action paths]
  C --> F[Disable gestures]
  F --> G[Save directions and keep click action]
  G --> A
Loading

Reviews (1) · Last reviewed commit: "chore: exclude unrelated camera lint fix" · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant