Skip to content

Allow Logitech gesture buttons to preserve click fallback - #1211

Merged
lujjjh merged 1 commit into
linearmouse:mainfrom
ehardesty:logitech-gesture-click-fallback
May 30, 2026
Merged

lujjjh merged 1 commit into
linearmouse:mainfrom
ehardesty:logitech-gesture-click-fallback

Conversation

@ehardesty

Copy link
Copy Markdown
Contributor

Summary

Allow Logitech gesture-button controls to behave like regular mouse buttons when no gesture is detected.

Previously, Logitech virtual/gesture controls were treated as fully handled as soon as the gesture transformer saw them. That prevented the Logitech fallback synthetic click from being posted, so a configured gesture button could trigger gestures but would not preserve normal click behavior.

This changes Logitech control handling from a boolean handled/not-handled result to a small enum so handlers can distinguish between:

  • controls that are fully handled internally
  • controls that are not handled
  • gesture controls that are handled for gesture tracking but should still allow synthetic fallback click events

With this, a Logitech gesture button can:

  • fall through as a click when released without crossing the gesture threshold
  • trigger the configured gesture when dragged past the threshold
  • suppress the click action after a gesture fires

Testing

  • xcodebuild test -project LinearMouse.xcodeproj -scheme LinearMouse
  • swiftformat --lint on changed Swift files
  • swiftlint --strict on changed non-legacy Swift files

Distinguish Logitech controls that are fully handled from gesture controls that should still emit their synthetic fallback click. This lets a Logitech gesture button behave like other mouse buttons: plain clicks fall through, while completed gestures suppress the click action.
@lujjjh

lujjjh commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@lujjjh
lujjjh merged commit d00572b into linearmouse:main May 30, 2026
1 check passed
@lujjjh lujjjh added the enhancement New feature or request label May 30, 2026
lujjjh added a commit that referenced this pull request Jun 19, 2026
## Summary

Follow-up to #1211.

When a Logitech control is used as a gesture button, defer its synthetic
click fallback until release. This keeps normal tap/click behavior when
no gesture is triggered, but suppresses the fallback click once a
gesture has handled the control.

## Testing

- `xcodebuild test -project LinearMouse.xcodeproj -scheme LinearMouse
-only-testing:LinearMouseUnitTests/GestureButtonTransformerTests
-only-testing:LinearMouseUnitTests/VendorSpecificDeviceMetadataTests`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants