Skip to content

feat(buttons): add smart zoom action to navigation category - #1038

Open
msongz wants to merge 1 commit into
Caldis:masterfrom
msongz:feat/smart-zoom
Open

msongz wants to merge 1 commit into
Caldis:masterfrom
msongz:feat/smart-zoom

Conversation

@msongz

@msongz msongz commented Sep 23, 2026

Copy link
Copy Markdown

Summary

This PR adds a Smart Zoom (smartZoom) action to the Navigation category (categoryNavigation) in mouse button bindings, allowing users to map a mouse button to trigger macOS's native smart zoom gesture (equivalent to a two-finger double-tap on Magic Mouse or Trackpad).

Changes

  • SystemShortcut.swift:
    • Registered smartZoom with pseudo-code 0xFFFB, modifier 0, execution mode .trigger, and SF Symbol plus.magnifyingglass.
    • Added smartZoom to categoryNavigation.
    • Adjusted pseudo-code boundary filter from < 0xFFFC to < 0xFFFB.
  • ShortcutExecutor.swift:
    • Added executeSmartZoom() that posts a synthetic macOS gesture event (NSEventTypeGesture = 29, kIOHIDEventTypeZoomToggle = 22) marked with MosEventMarker.syntheticCustom.
    • Added action resolution and execution dispatch for smartZoom.
  • Localizable.xcstrings:
    • Added localized strings for "Smart Zoom" across all supported languages.
  • InputProcessorTests.swift:
    • Added unit tests verifying definition, navigation category grouping, action resolution, gesture event construction, and button down/up lifecycle.

Verification

  • Passed boundary lint: scripts/qa/lint-logi-boundary.sh
  • Unit tests added covering smartZoom in InputProcessorTests

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