Hello, I’m new to Linux and Manjaro. I’m trying to set my gestures similar to how they were set on my old Mac Book Air. I’ve set up the 3 finger swipe properly, however, I’m having trouble getting 2-finger pinch zoom to work properly.
I did get it to work using xdotool key Control + 0x002b & xdotool key Control + 0x002d. But that doesn’t zoom in and out smoothly, it’s very choppy.
I currently have it set to xdotool key Meta+0x002b & xdotool key Meta+0x002d for zoom in and out, but it doesn’t do anything.
Follow these steps to configure libinput-gestures:
sudo gpasswd -a <user_name> input #add user in input group
libinput-gestures-setup desktop #set up the application using your [DE](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html)
libinput-gestures-setup autostart #enable the app to start automatically in the background
libinput-gestures-setup start #start the app immediately in the background:
Make a file ~/.config/libinput-gestures.conf and add these contents:
# Go back/forward in chrome
gesture: swipe right 3 xdotool key Alt+Left
gesture: swipe left 3 xdotool key Alt+Right
# Zoom in / Zoom out
gesture: pinch out xdotool key Ctrl+plus
gesture: pinch in xdotool key Ctrl+minus
# Switch between desktops
gesture: swipe left 4 xdotool set_desktop --relative 1
gesture: swipe right 4 xdotool set_desktop --relative -- -1
So, I actually did those steps initially with the GUI app. I was able to get Zoom in / Zoom out to work using Ctrl+plus & Ctrl+minus; except that I just used the codes 0x002b and 0x002d respectively.
But, that type of zoom looks choppy to me and I see that you can zoom in/out using the windows/meta/super key + plus or minus. The second option look much smoother and it would be nice if I could do that instead. To reiterate, I’d like to zoom in/out using the Windows/Meta/Super key and not with the control key.
However, when I added that in the gestures app it didn’t work. So if I add: gesture pinch out xdotool key Meta + 0x002b gesture pinch in xdotool key Meta + 0x002d
Neither of them work
Thank you for showing me to switch between desktops by the way, I was wondering how I could do that.
This did work with Ctrl+plus and same for minus. The default zoom in/out for kde is Meta+equal and Meta+minus. So rather than using + and - use = and -:
gesture: pinch out xdotool key Meta_L+equal
gesture: pinch in xdotool key Meta_L+minus
Use Super_L instead of Meta_L. This is how the config looks:
# Zoom in / Zoom out
gesture: pinch out xdotool key Super_L+equal
gesture: pinch in xdotool key Super_L+minus
Make sure you are using the default shortcuts for zoom in/out in kde shortcut settings. This is strange because it wasn’t working with Meta even though here it’s given Meta only: