Skip to content

Instantly share code, notes, and snippets.

@evansmwendwa
Created November 19, 2019 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evansmwendwa/c30643e13d4e1b7f6cf6609ab67090df to your computer and use it in GitHub Desktop.
Save evansmwendwa/c30643e13d4e1b7f6cf6609ab67090df to your computer and use it in GitHub Desktop.

Wanted to report back on some research and success enabling middle click action.

deepin doesn’t use libinput-gestures nor gesture-manager, although this is probably the correct answer on vanilla arch.

Deepin uses a built in touchpad solution controlled by dde-daemon. All touchpad gestures are controlled by the file /usr/share/dde-daemon/gesture.json. To enable middle click via 3-finger tap, add the following entry in the json array:

   {
        "Name": "tap",
        "Direction": "none",
        "Fingers": 3,
        "Action": {
            "Type": "commandline",
            "Action": "xdotool click 2"
        }
    }

Ensure xdotool is installed, which passes command line actions to the X server. Logging out and in didn’t seem to enable it for me, but rebooting did.

Including the entire /usr/share/dde-daemon/gesture.json file for reference. As a bonus, this also lists all available multitouch gestures and what they do.

@christophebe
Copy link

Hello,
I doesn't work for me on Deepin 15.11

I would like to add support to go back/forward in a browser with the touchpad (equivalent of alt left/rigth). I modify the gesture.json but it doesn't work.
Here are my modifications :
{
"Name": "swipe",
"Direction": "left",
"Fingers": 4,
"Action": {
"Type": "commandline",
"Action": "xdotool key alt+Right"
}
},
{
"Name": "swipe",
"Direction": "right",
"Fingers": 4,
"Action": {
"Type": "commandeline",
"Action": "xdotool key alt+Left"
}
},

xdotool is well installed.

@evansmwendwa
Copy link
Author

Got this somewhere from the Internet. The gestures worked for me though I think they only handle touchpad multi touch gestures for switching between multiple desktops and not browser specifically. Something like what Mac OS does for fullscreen windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment