![Add multitouch trackpad gestures in Linux](https://ytimg.googleusercontent.com/vi/ArBCfhVsTZw/hqdefault.jpg)
Support the channel on Patreon: https://www.patreon.com/thelinuxexperiment
Follow me on Twitter: http://twitter.com/thelinuxEXP
What I use to make my videos:
Microphone: https://amzn.to/2PsNWXl
GPU: https://amzn.to/2LHZ5o5
Motherboard: https://amzn.to/2KZt63t
Processor: https://amzn.to/2IFjKrw
———-
Libinput-Gestures link: https://github.com/bulletmark/libinput-gestures
Gestures app link: https://gitlab.com/cunidev/gestures
List of key codes: https://gitlab.com/cunidev/gestures/wikis/xdotool-list-of-key-codes
Orders :
sudo gpasswd -a USER entry
sudo apt-get install wmctrl python3 python3-setuptools xdotool python3-gi libinput-tools python-gobject
Downloads cd/libinput-gestures
sudo make install
cd Downloads/gestures
sudo python3 setup.py install
Installing Libinput
To add gestures in Linux, you will need Libinput-gestures, which is a small library capable of detecting and recognizing different multitouch gestures on your trackpad.
To install it, the procedure is quite simple.
First, you will need to add your user to the INPUT group so you can use gestures. Simply open a terminal and type:
sudo gpasswd -a USER entry
Once you have entered your password and the command is complete, you will need to log out and log in again.
Next, let's install a few packages we'll need to get started:
In your terminal, type:
sudo apt-get install wmctrl python3 python3-setuptools xdotool python3-gi libinput-tools python-gobject
These packages will allow you to map gestures to specific key presses and use an application to create the gestures.
Next, we will download and install libinput-gestures.
Go to the project's github page and download the archive. Extract it to your Downloads folder.
Next, open a terminal and type:
Downloads cd/libinput-gestures-master
sudo make install
Everything should now be installed correctly. We'll just need to make sure the libinput gestures start with the system, so we'll type in the terminal:
autostart libinput-gestures-setup
starting libinput-gestures-setup
Installing the Gestures app
To create your own gestures, there's a handy little app that lets you select the gesture you want and the command you want to perform when the gesture is detected. It's called /"Gestures/".
head over to the Github page (again, link in description below) and download the archive. Extract it to your Downloads folder.
Then, in your terminal, type:
cd Downloads/gestures
sudo python3 setup.py install
And that's it, now everything is configured, you can safely delete the folders from your downloads directory
Create your gestures
This is the easy part. The app allows you to click the /"/" button to create a new gesture. Select the type of gesture: pinch or swipe, the number of fingers, then the direction of the gesture.
You then need to type the command you want to execute when you perform the actual gesture.
To map a gesture to a specific key press, you can use xdotool.
Just type the xdotool key
Next, the key combination you want to do.
You can type Super, Control, Alt, or Shift, then the key you want.
As an example, I created a 3-finger swipe up to launch multitasking view on a basic OS. I mapped it to the standard Super Down elemental shortcut.
I just hit the xdotool Superdown key
For a list of codes you can use for each key, head to the link in the description below and tell us the key code in the second column of the key you want to use to create a gesture. pinch to zoom, the shortcut to use if Control Plus. The Plus key code is 0x002b
You will therefore need to type:
xdotool key Control0x002b
That's it, once your gestures are saved, they will automatically load each time the system starts, so no more fiddling 🙂
Please take the opportunity to connect and share this video with your friends and family if you find it useful.
No Comments