[How to] enable Three-finger-drag

A while ago, I wrote a small praising on a touch pad input system in Zorin.

Well, it is almost perfect, except for one minor touch (pan intended). When I was using macOS, I always enabled three-finger-drag, which allowed me to press with three fingers on the top of opened window and move it around. It also let me select a text by dragging on it.

This is a tutorial to add this missing function, called three-finger-drag. The tutorial is based on:

  1. Install the following (some of them might be already installed):
    $ sudo apt install -y python3 python3-setuptools xdotool wmctrl python3-gi libinput-tools python-gobject git

  2. Add user to input group:
    $ sudo gpasswd -a $USER input

IMPORTANT: make sure to Reboot immediately after this. Logout will not work.

  1. Download a file:
    libinput-three-finger-drag.tgz
    from
    Release Initial Release · marsqing/libinput-three-finger-drag · GitHub

  2. Uncompress it and copy the binary file to:
    /usr/bin/
    and set it to autostart

That's it.
Reboot and enjoy truly Mac style input system :smiling_face_with_three_hearts:

2 Likes

Hi @FrenchPress

You can use ``` and end with end with 3 of them to indicate command on the forum.

So it looks like this;

sudo apt update

A quick off-topic resource...

2 Likes

Ah, thanks.
I did not know about this function. I will try that next time :slight_smile:

Sweet, I will definitely try this. I really miss the 3 finger drag from my mac! Thank you

This project might interest you. It aims to get Linux touchpad like macbooks.

1 Like

If you also have an Apple/mac keyboard and prefer to use function keys as real function keys, you might find my other tutorial for that subject useful.

No, I am not on mac anymore. Thanks for the tutorial though, but I have gone the exact opposite way. I like the multimidia keys on by default, so I had to do some digging around to get it working on my laptop.

Unfortunately I couldn't get it to invert the behavior cleanly like that, where pressing fn + an F key would output the F key. I had to map the function key to the multimedia action, "losing" the function key in the process.

I am not so sure if I can help you, but would you mind to tell me which make/model laptop you use?

Loosing Function keys does not sound right. I myself use Magic trackpad and Apple keyboard.

I have an LG Gram.
To accomplish what I told you, I do the following:

Open this file

sudo gedit /usr/share/X11/xkb/symbols/pc

Add this:

    key <FK02> { [XF86MonBrightnessDown] };
    key <FK03> { [XF86MonBrightnessUp] };
    key <FK04> { [XF86AudioPrev] };
    key <FK05> { [XF86AudioPlay] };
    key <FK06> { [XF86AudioNext] };
    key <FK07> { [XF86KbdBrightnessDown] };
    key <FK08> { [XF86KbdBrightnessUp] };

    key <FK10> { [XF86AudioMute] };
    key <FK11> { [XF86AudioLowerVolume] };
    key <FK12> { [XF86AudioRaiseVolume] };

In Z16, I could get away with mapping FK4-6 and FK10-12 through Keyboard Shortcuts in Settings, since those options are now available there. But since I already had this working and I don't see benefits, other than convenience, I have maintained this approach.

1 Like

Thanks for this detailed explanation :blush:
It seems you know way better than me about keyboard mapping.
I just opened /usr/share/X11/xkb/symbols/pc and amazed to see what I could customize there.
Yet one more reason I :heart: Linux.

1 Like