The original post: /r/linux by /u/neo-raver on 2024-12-18 20:34:11.
Project Link
https://github.com/lmr97/linux-3-finger-drag
What is three-finger dragging?
Three-finger dragging is a feature originally for trackpads on Mac devices: instead of holding down the left click on the pad to drag, you can simply rest three fingers on the trackpad to start a mouse hold, and move the fingers together to continue the drag in whatever direction you move them in. In short, it interprets three fingers on the trackpad as a mouse-down input, and motion with three fingers afterwards for mouse movement. It can be quite handy, as it will save your hand some effort for moving windows around and highlighting text.
Here is an example of three-finger dragging in action on a MacBook.
About the project
Using the structure of another existing program that does the same thing for X-run desktop environments, I built this program to emulate the three-finger drag feature of Mac laptops. But instead of using an X-based intermediary application, it writes to uinput directly, which lies right above the kernel and would (theoretically, as I understand it) make it compatible with any desktop environment running on a Linux distro, regardless of display server / protocol.
You can also configure the speed of the dragging, and how long the mouse hold persists after you raise your fingers using the included (optional) configuration file.
It works like a charm on my Dell Inspiron laptop running Kubuntu 24.10, but I’m eager to see if it works on other hardware/distros. Try it and let me know how it goes!