In an earlier tutorial I introduced you to the Leap Motion controller, showed how to set it up and start using apps that support it. I use one of my favourite apps, BetterTouchTool, to create custom trackpad gestures. With this you can also create custom gestures for the Leap Motion Controller.
In this tutorial I'll show you how to do this and use BetterTouchTool to integrate Leap Motion Controller gestures into workflows.
BetterTouchTool is a free, utility app that lets you use custom gestures–on Magic Mouse, Magic Trackpad and now, the Leap Motion Controller–to trigger keyboard shortcuts and system actions. You can assign the same gestures different functions in different applications.
In the tutorial about custom trackpad gestures I explained how to set up BetterTouchTool, import gestures that other people have created and create new gestures. You may find it useful to refer back that tutorial whilst reading this one.
BetterTouchTool mainly supports gestures in the X-Y plane above the Leap Motion Controller. You can use single finger, two finger, three finger and five finger gestures.
For example, you can assign different actions to moving your hand with all five fingers extended to the left over the Leap Motion Controller, to the right over it, up away from it or down towards it.
As well as the sixteen simple X-Y gestures, BetterTouchTool offers a number of extra gestures: you can also move one, two, three or five fingers forwards towards your screen and then straight backwards as if you are tapping it, rotate one, two or three fingers clockwise and counter clockwise or clap your hands together.
The best way to have your gestures detected is:
- Hold your hand in a clenched fist over the device.
- Extend the number of fingers required for the gesture you want to perform.
- Pause for half a second.
- Move your hand in the direction of the gesture.
- Re-clench your hand into a fist.
- Bring it back to the centre.
- Repeat for the next gesture you want to do.
If you don’t clench your hand before moving it back to the centre, BetterTouchTool may detect the inverse of the gesture you just performed as you move your hand.
The Leap Motion Controller seems to have the hardest time discerning between one and two finger gestures. If you don’t hold your two fingers sufficiently wide apart when you gesture, it will register them as a single finger; because of this, I prefer to avoid using two finger gestures, or to assign them to the same shortcut as the single finger gestures.
For three finger gestures extending your index finger, middle finger and thumb works best.
The Leap Motion Controller is slightly better at detecting gestures on the X-axis than the Y-axis. If you have a choice, I recommend you assign your most used actions to X-axis gestures.
Learning the Gestures
BetterTouchTool has a useful option to show a HUD, or head-up display, notification of what gesture it detects.
I have created a preset for you to download that has all the gestures set up to show the notification with no assigned shortcuts. Use this preset to practice the gestures and experiment to see how different movements are detected and interpreted.
Incorporating Gestures Into a Workflow
Compared to keyboard shortcuts or trackpad gestures, it can be a bit harder to work out where Leap Motion gestures fit into your workflow.
I believe that almost everyone can benefit from learning keyboard shortcuts and creating custom trackpad gestures. The amount of people who’ll benefit hugely from custom Leap Motion gestures is smaller–but I think most power users will certainly have a few uses.
Actions that you want to do quickly, and that your hands might not be on the trackpad or keyboard when you want to do them, work best. For example, the save gesture I use for Byword lets me save my work as I walk away from the Mac.
In addition to being a writer, I am a photographer and designer. I spend a lot of time browsing the web, writing and using Adobe’s Creative Cloud applications–particularly Adobe Photoshop Lightroom. My custom Leap Motion gestures reflect this.
My gestures are available as a preset which you can download and tweak as you desire. You should take my ideas as suggestions rather than something set in stone.
In the previous tutorial with BetterTouchTool, I used three finger trackpad gestures to move between tabs, open new tabs, close tabs and reopen recently closed tabs.
For my Leap Motion gestures, I used the same gestures to keep everything consistent. Moving three fingers up opens a new tab (and reopens the last closed tab if the shift key is held), moving them down closes one. Moving three fingers to the left or right moves over a tab.
I use password manager 1Password to create really secure passwords for all my online accounts. 1Password uses the keyboard shortcut Command-_ to automatically fill in your login details. I mapped this shortcut to the clap gesture.
I use Byword to write tutorials in Markdown. There are two features of Byword I have mapped to Leap Motion gestures:
- a three finger gesture right triggers the keyboard shortcut Command-S which saves the document, and
- a three finger gesture left triggers Command-Option-P which activates Byword’s Markdown previewer.
In Lightroom I use the three fingers right and left gestures to quickly pick or reject imported photos. It is extremely satisfying to sit back, put the new photos on fullscreen and, with a casual gesture, determine their fate!
Quicktime and VLC
One of the things I’ve found the Leap Motion Controller most useful for is controlling media playback on my Mac. You can relax and control the movie you are watching just by waving your hands.
I use a three finger gesture right to play or pause the movie with the Spacebar key. A single finger rotating clockwise increases the volume and a single finger rotating counter clockwise lowers it.
I use a grid of virtual desktops created with TotalSpaces2. I showed how to create this set up in a previous tutorial. I set up the keyboard shortcut Control-Option-Shift and the Arrow Keys to navigate around the grid.
I mapped these shortcuts to a five finger gesture in the opposite direction of the Space I want to move to. In an almost Minority Report like manner, I can reach out with five fingers and, as if I’m touching the screen, gesture to move to a different Space.
In this tutorial I’ve shown you how to integrate a Leap Motion Controller and BetterTouchTool into your workflows.
With the two sets of BetterTouchTool presets I have included, the practice preset and my custom gestures preset, I have given you a base to work from when developing your own custom Leap Motion gestures.
If you have any suggestions for great Leap Motion gestures please let me know in the comments. I’m always keen to hear other people’s ideas.
Subscribe below and we’ll send you a weekly email summary of all new Computer Skills tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post