Skip to content

Instantly share code, notes, and snippets.

@findmory
Last active January 30, 2024 10:38
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save findmory/82593b407ef436fe8a39f1bbb6802690 to your computer and use it in GitHub Desktop.
Save findmory/82593b407ef436fe8a39f1bbb6802690 to your computer and use it in GitHub Desktop.
Send Trackpad gestures over Barrier/Synergy using BetterTouchTool

Problem: Controlling a remote Mac desktop using a tool like Barrier or Synergy doesn't allow for trackpad gestures to be sent to the client machine.

Solution: Use Better Touch Tool on host machine to handle the gestures and send a remote command to the client machine.

Steps to setup:

[1] On the CLIENT machine in BTT setup these Named triggers:

Name: “mission”
Action: “Mission Control”
Name: “right”
Action: “Move Right a Space”
Name: “left”
Action: “Move Left a space”

Client Actions

[2] On client - enable BetterTouchTool Webserver

Client Webserver Settings

[3] On the HOST, disable *Swipe Better full-screen apps” and “mission control” from the Trackpad preferences (you are going to control all these gestures using BTT) Host Trackpad Settings

[4] In Trackpad items in BTT on host create an action for “3 Finger Swipe up”, another for “3 Finger Swipe Right”, etc

Each one should execute the terminal command to send the curl command which calls the named action on your client.

For example when you 3 finger swipe left, you call this: curl http://169.254.100.150:12345/trigger_named/?trigger_name=left

BTT host actions

I like to do a modifier key for the remote machine (here I’m using ctrl) so the action doesn’t trigger on the host. And then your host actions are also setup as you can see in the screenshot above.

@armarell
Copy link

armarell commented Mar 31, 2021

Is anyone been able to get this work on Big Sur? I am having trouble.

@thibaut2hd
Copy link

Works fine on Big Sur here, between intel MacBook and M1 mini...

@ThomasKleinhans
Copy link

Does anyone know how i could use this between a macOs and a Windows ? Doesn't matter if the server is the mac or the windows. I would like to use gesture both on mac and windows

@ayodelec
Copy link

please can you make the steps a little more detailed?

@spoelstraethan
Copy link

@ThomasKleinhans You can use Barrier or Synergy to use share a keyboard/mouse between both devices and then map gestures with BTT to send a keystroke, Barrier or Synergy should then target the correct device (client or server) with that keystroke. You can also remap some keys/keystrokes with Barrier or Synergy.

@ElhemEnohpi
Copy link

@spoelstraethan That's a good idea, but I guess you haven't actually tried it? It doesn't work. The virtual keystrokes that BTT generates are not the same as actually pressing keys on the keyboard. Barrier doesn't send them to the client.

@NickHatBoecker
Copy link

Is there any thinkable way of enabling zoom gestures with BTT? I used every remote software on the market but I cannot zoom anything on my Macbook Pro host with my magic trackpad 2 connected on the client. All multi touch gestures are interpreted on the client, not on the host :(

@simonsnow
Copy link

simonsnow commented Nov 16, 2022

You can also use advanced conditions on the host computer's BTT settings to cause the triggers to fire only when your mouse is on the client computer.

The "Other Current State" section can help you find useful conditions.

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