Skip to content

Instantly share code, notes, and snippets.

@ddrager
Created February 6, 2019 09:21
Show Gist options
  • Save ddrager/43f41a77573c520129672faf246c1aa3 to your computer and use it in GitHub Desktop.
Save ddrager/43f41a77573c520129672faf246c1aa3 to your computer and use it in GitHub Desktop.
Deepin Linux Touchpad Config - Including 3 tap for middle button click. /usr/share/dde-daemon/gesture.json
[
{
"Name": "tap",
"Direction": "none",
"Fingers": 3,
"Action": {
"Type": "commandline",
"Action": "xdotool click 2"
}
},
{
"Name": "swipe",
"Direction": "up",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "ToggleMaximize"
}
},
{
"Name": "swipe",
"Direction": "down",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "ToggleMaximize"
}
},
{
"Name": "swipe",
"Direction": "left",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "SplitWindowLeft"
}
},
{
"Name": "swipe",
"Direction": "right",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "SplitWindowRight"
}
},
{
"Name": "pinch",
"Direction": "in",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "ShowWindow"
}
},
{
"Name": "pinch",
"Direction": "out",
"Fingers": 3,
"Action": {
"Type": "built-in",
"Action": "ShowWindow"
}
},
{
"Name": "swipe",
"Direction": "up",
"Fingers": 4,
"Action": {
"Type": "built-in",
"Action": "ShowWorkspace"
}
},
{
"Name": "swipe",
"Direction": "down",
"Fingers": 4,
"Action": {
"Type": "built-in",
"Action": "ShowWorkspace"
}
},
{
"Name": "swipe",
"Direction": "left",
"Fingers": 4,
"Action": {
"Type": "built-in",
"Action": "ReverseSwitchWorkspace"
}
},
{
"Name": "swipe",
"Direction": "right",
"Fingers": 4,
"Action": {
"Type": "built-in",
"Action": "SwitchWorkspace"
}
},
{
"Name": "pinch",
"Direction": "in",
"Fingers": 4,
"Action": {
"Type": "commandline",
"Action": "qdbus --literal com.deepin.dde.Launcher /com/deepin/dde/Launcher com.deepin.dde.Launcher.Toggle"
}
},
{
"Name": "pinch",
"Direction": "out",
"Fingers": 4,
"Action": {
"Type": "commandline",
"Action": "/usr/lib/deepin-daemon/desktop-toggle"
}
},
{
"Name": "swipe",
"Direction": "up",
"Fingers": 5,
"Action": {
"Type": "built-in",
"Action": "ShowWorkspace"
}
},
{
"Name": "swipe",
"Direction": "down",
"Fingers": 5,
"Action": {
"Type": "built-in",
"Action": "ShowWorkspace"
}
},
{
"Name": "swipe",
"Direction": "left",
"Fingers": 5,
"Action": {
"Type": "built-in",
"Action": "ReverseSwitchWorkspace"
}
},
{
"Name": "swipe",
"Direction": "right",
"Fingers": 5,
"Action": {
"Type": "built-in",
"Action": "SwitchWorkspace"
}
},
{
"Name": "pinch",
"Direction": "in",
"Fingers": 5,
"Action": {
"Type": "commandline",
"Action": "qdbus --literal com.deepin.dde.Launcher /com/deepin/dde/Launcher com.deepin.dde.Launcher.Toggle"
}
},
{
"Name": "pinch",
"Direction": "out",
"Fingers": 5,
"Action": {
"Type": "commandline",
"Action": "/usr/lib/deepin-daemon/desktop-toggle"
}
}
]
@lkxed
Copy link

lkxed commented Apr 28, 2020

How to Add Keyboard Shortcuts to Gestures, like 3 fingers horizontal swipe to toggle Alt+Tab.
Thank you in advance.

I need this too.

@callmed
Copy link

callmed commented May 6, 2020

How to Add Keyboard Shortcuts to Gestures, like 3 fingers horizontal swipe to toggle Alt+Tab.
Thank you in advance.

Use the man pages of xdotool and once you have the key combination you are looking for, put it into a tap-action within gesture.json

@cizzzzzz
Copy link

I cannot use the tap gesture on my touchpad when presented with a login screen. I tried to add this gesture but it doesn't seem to make any difference:
{
"Name": "tap",
"Direction": "none",
"Fingers": 1,
"Action": {
"Type": "commandline",
"Action": "xdotool click 1"
}
}
I also tried this but no luck either:
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true

Can anybody tell me what else I can try?
Thank you!

@AyushTank
Copy link

Use an external mouse

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