Skip to content

feat(core): add zoom in/out actions and thumb-wheel zoom preset - #1590

Open
johnbuzz98 wants to merge 1 commit into
AprilNEA:masterfrom
johnbuzz98:feat/thumbwheel-zoom
Open

johnbuzz98 wants to merge 1 commit into
AprilNEA:masterfrom
johnbuzz98:feat/thumbwheel-zoom

Conversation

@johnbuzz98

Copy link
Copy Markdown

Summary

Logi Options+ can map the MX Master thumb wheel to zoom, but OpenLogi has no zoom action, so users coming from Options+ lose that mapping. This adds ZoomIn / ZoomOut actions and two thumb-wheel presets, Zoom Out / In and Zoom In / Out, so rolling the wheel forward zooms in and backward zooms out (or the reverse).

The actions send the standard zoom chords: Cmd+= / Cmd+- on macOS and Ctrl+= / Ctrl+- on Linux and Windows. That covers browsers, Preview, Office, and most editors. They are ordinary discrete actions, so the existing thumb-wheel threshold and cooldown apply.

Changes

  • openlogi-core: append Action::ZoomIn / ZoomOut (Navigation category, pickable) and Shortcut::ZoomIn / ZoomOut, append ActionRingIcon::ZoomIn / ZoomOut, and extend the serialized-name test.
  • openlogi-inject: map the new shortcuts in the macOS, Linux, and Windows chord tables; pin the macOS and Linux rows in combo_table_pins_representative_shortcuts; list the actions in the inject_action example.
  • openlogi-ipc: bump PROTOCOL_VERSION to 32 for the appended wire variants. Existing goldens are unchanged because the variants are appended.
  • openlogi-ui: add zoom-in.svg / zoom-out.svg (Lucide) to the embedded icons, and add actions.zoom_in, actions.zoom_out, pointer.zoom_out_in, and pointer.zoom_in_out to every locale in the same position.
  • openlogi-desktop: add the Zoom / ZoomReversed thumb-wheel presets and the action icons.

Testing

On macOS (Apple Silicon, Command Line Tools only):

export RUSTFLAGS="-D warnings"
cargo fmt --all -- --check
cargo clippy --workspace --exclude openlogi-desktop --exclude openlogi-overlay --all-targets -- -D warnings
cargo test --workspace --exclude openlogi-desktop --exclude openlogi-overlay
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items \
  --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agent
cargo test -p openlogi-desktop thumbwheel   # with gpui runtime_shaders enabled locally (no Metal toolchain)

Workspace tests: 1456 passed, including locale_files_have_the_same_keys, the wire_format goldens, and the macOS combo-table test.

Live injection check on macOS: cargo run --example inject_action -p openlogi-inject -- ZoomIn ZoomIn ZoomIn, with Chrome frontmost, zoomed example.com from 100% to 150%, and ZoomOut brought it back to 100%.

Not runtime-tested end to end on hardware: I haven't driven the full thumb-wheel → agent → inject path with a physical MX Master 3 on this build, and openlogi-desktop / openlogi-overlay clippy and the GUI screenshot were not run here (the host lacks Xcode's Metal compiler). To test: pick Thumb Wheel → Zoom Out / In in the Buttons tab, then roll the wheel in a browser.

Options+ lets the MX Master thumb wheel zoom the frontmost view; OpenLogi
had no zoom action, so that mapping could not be reproduced.

Add Action::ZoomIn/ZoomOut (appended), mapped to Cmd+=/Cmd+- on macOS and
Ctrl+=/Ctrl+- on Linux and Windows, plus matching Actions Ring icons and
"Zoom Out / In" and "Zoom In / Out" thumb-wheel presets. Bump the IPC
protocol to v32 for the appended wire variants.
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Adds zoom in and out actions to the input binding system.

The PR appears safe to merge; the Windows zoom chords would benefit from a non-blocking regression test.

Fix All in CodexFindings

  1. P2 Windows zoom chords lack tests ▶

Summary

The PR adds zoom actions, platform-specific keyboard chords, and forward/reverse thumb-wheel presets, with matching icons, translations, and an IPC version bump.

  • The action-to-injection and thumb-wheel direction paths are wired through existing mechanisms.
  • Windows chord identity lacks the regression assertions added for macOS and Linux.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Thumb-wheel preset"] --> B["Backward / forward bindings"]
  B --> C["ZoomOut / ZoomIn actions"]
  C --> D["Shortcut effect"]
  D --> E["Platform keyboard chord"]
Loading

Reviews (1) · Last reviewed commit: "feat(core): add zoom in/out actions and ..."

Comment on lines +106 to +107
Shortcut::ZoomIn => "Ctrl+=",
Shortcut::ZoomOut => "Ctrl+-",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Windows zoom chords lack tests

The Windows test checks that each shortcut key has a virtual-key mapping, but it does not check the modifier or full chord for these new actions. A later change to either zoom chord could therefore break Windows zoom without failing the test. Please pin both chord labels, as the macOS and Linux tests do.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex Fix in Claude Code

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