[problem help] How to enable touchpad gestures in Deepin 23?
Tofloor
poster avatar
c***v@gmail.com
deepin
2024-05-18 23:08
Author

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.

Reply Favorite View the author
All Replies
Owensuwu
deepin
2024-05-19 08:12
#1

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:

  1. Open up your terminal (you know, that black window where you type commands).

  2. Paste in this command and hit Enter:

    sudo apt install libinput-tools xdotool
    

    This installs libinput-tools to manage gestures and xdotool 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:

  1. 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
    
  2. 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
    
  3. Save the file (Ctrl+O) and exit (Ctrl+X).

Step 3: Start the Gestures

Almost there! Let's make it work:

  1. 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 the libinput-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!

Reply View the author
c***v@gmail.com
deepin
2024-05-23 04:17
#2
Owensuwu

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:

  1. Open up your terminal (you know, that black window where you type commands).

  2. Paste in this command and hit Enter:

    sudo apt install libinput-tools xdotool
    

    This installs libinput-tools to manage gestures and xdotool 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:

  1. 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
    
  2. 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
    
  3. Save the file (Ctrl+O) and exit (Ctrl+X).

Step 3: Start the Gestures

Almost there! Let's make it work:

  1. 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 the libinput-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!

Thank you for your reply. I am quite "command-line-y" myself. 🙂

I wasn't looking to install any new commands, but was trying to remember which file I could edit to get those touchpad gestures. I haven't been using Deepin for a while, and that was a long while, so I've forgotten the name of that file. It is there in Deepin, it always was from the beginning. I'll remember the file name one way or another.

Also, libinput-tools xdotool would trouble what's already available in Deepin natively. Two input systems would just mess it up.

Reply View the author
h***k@gmail.com
deepin
2024-05-31 17:05
#3

Drift Boss is a game that helps players practice skilled driving skills.

Reply View the author