feat(core): add zoom in/out actions and thumb-wheel zoom preset - #1590
johnbuzz98 wants to merge 1 commit into
Conversation
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.
|
| Shortcut::ZoomIn => "Ctrl+=", | ||
| Shortcut::ZoomOut => "Ctrl+-", |
There was a problem hiding this comment.
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!
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/ZoomOutactions 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
Action::ZoomIn/ZoomOut(Navigation category, pickable) andShortcut::ZoomIn/ZoomOut, appendActionRingIcon::ZoomIn/ZoomOut, and extend the serialized-name test.combo_table_pins_representative_shortcuts; list the actions in theinject_actionexample.PROTOCOL_VERSIONto 32 for the appended wire variants. Existing goldens are unchanged because the variants are appended.zoom-in.svg/zoom-out.svg(Lucide) to the embedded icons, and addactions.zoom_in,actions.zoom_out,pointer.zoom_out_in, andpointer.zoom_in_outto every locale in the same position.Zoom/ZoomReversedthumb-wheel presets and the action icons.Testing
On macOS (Apple Silicon, Command Line Tools only):
Workspace tests: 1456 passed, including
locale_files_have_the_same_keys, thewire_formatgoldens, 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%, andZoomOutbrought 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-overlayclippy 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.