xinput-gui
xinput-gui copied to clipboard
Adding a pinch gesture for zooming in and out with magic trackpads or trackpads in general
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!
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.