Hey friend
I'm gonna show you how to get those fancy touchpad gestures working on Deepin 23. It's a bit command-line-y, but stick with me, it's not too hard!
Step 1: Install the Tools
First, we need to grab a couple of tools:
-
Open up your terminal (you know, that black window where you type commands).
-
Paste in this command and hit Enter:
sudo apt install libinput-tools xdotool
This installs
libinput-tools
to manage gestures andxdotool
to simulate key presses. It might ask for your password; just type it in and hit Enter again.
Step 2: Create the Configuration
Now, let's tell the system what gestures we want:
-
Create a new file called
libinput-gestures.conf
in your home folder's.config
directory. You can do this in the terminal with this command:nano ~/.config/libinput-gestures.conf
-
Paste this into the file:
gesture swipe left 2 xdotool key alt+Left # 2-finger swipe left to go back a page gesture swipe right 2 xdotool key alt+Right # 2-finger swipe right to go forward gesture pinch begin xdotool keydown ctrl # Pinch to start zoom gesture pinch end xdotool keyup ctrl # Release pinch to stop zoom
-
Save the file (Ctrl+O) and exit (Ctrl+X).
Step 3: Start the Gestures
Almost there! Let's make it work:
-
In the terminal, run this command:
libinput-gestures-setup start
This starts a background process to watch for your gestures.
Step 4: Test It Out!
Now try those gestures in your web browser or other apps! Two-finger swiping should take you back and forth in pages, and pinching should zoom in and out. Cool, right?
Extra Tips:
- You can add more gestures to the
libinput-gestures.conf
file. Check thelibinput-gestures
documentation online for the full list of options. - If you want these gestures to start automatically every time you log in, you can add
libinput-gestures-setup autostart
to your startup applications.
Let me know if you have any trouble!
How to enable touchpad gestures such as "pinch to zoom" and "2-finger horizontal scrolling" to go back and forth in web pages in Deepin 23?
There are 2-finger vertical scroliing, double tap, 3-finger swipes, 4-finger swipes, but still cannot find pinch to zoom and horizontal go back one tab, or go forward one tab swipes.