Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a pinch gesture for zooming in and out with magic trackpads or trackpads in general #13

Open
bluesialie opened this issue Dec 11, 2023 · 2 comments

Comments

@bluesialie
Copy link

Hi! There are a few people asking how to use the magic trackpad features of Zooming in or out with a "pinch" gesture and it would be a really useful feature to add

for eg: https://superuser.com/questions/1705684/does-the-apple-magic-trackpad-2-work-on-linux and also
https://askubuntu.com/questions/1474294/touchpad-pinch-zoom-not-functional-in-ubuntu-22-04

I already installed xinput-gui and while i was trying to change some parameters, I believe I didn't find which one activates or deactivates this feature.

Hoping it's a clear description,
Thnks!

images

@tec655
Copy link

tec655 commented Dec 26, 2023

It seems like your message is referring to a specific context or conversation, and the reference to "Adding a pinch gesture for zooming in and out with magic trackpads or trackpads in general #13" may be part of a larger discussion. If you're looking for information or guidance on adding pinch gestures for zoom magic on trackpads, especially with Magic Trackpads, you might be interested in incorporating this feature into software or applications.

@jerr045
Copy link

jerr045 commented Dec 26, 2023

In your macOS application, use gesture recognizers to detect pinch gestures. Cocoa provides gesture recognizers that you can use in your code.
Implement Zoom Logic:

Once a pinch gesture is detected, implement the logic for zooming in and out. This would involve changing the scale or zoom factor of the content being displayed.
Update UI:

As the user performs the pinch gesture, update the user interface to reflect the changes in zoom level. This might involve redrawing or updating the displayed content.

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

No branches or pull requests

6 participants
@bluesialie @jerr045 @tec655 and others