You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is wyager's Proof-of-concept code for a Leap Motion-based mouse controller. It now works with both OS X and Windows.
1
+
PyLeapMouse
2
+
===========
3
+
4
+
wyager's Proof-of-concept code for a Leap Motion-based mouse controller. It now works with both OS X and Windows.
2
5
3
6
The most recent version is on Github at github.com/openleap/pyleapmouse.
4
7
5
-
CONFIGURATION:
6
-
1)Launch the Leap app (if not launched already) and plug in your Leap
7
-
2)If you have not done so already, Configure your Leap screen from the Leap menu.
8
-
3)WINDOWS USERS: You must copy all required library files (.libs and .dlls) from your Leap SDK folder to the "Windows" folder. These files are already included for OS X users, because OS X is 64-bit only.
9
-
4)`cd` to the directory all this stuff is in and run `python PyLeapMouse.py` (minus quotes) or just double-click PyLeapMouse.py if you have your computer configured to launch .py files.
10
-
5)Launch with the --palm argument to run in palm mode (with much more accurate two-handed control).
8
+
###Configuration:
9
+
1.Launch the Leap app (if not launched already) and plug in your Leap
10
+
2.If you have not done so already, Configure your Leap screen from the Leap menu.
11
+
3.WINDOWS USERS: You must copy all required library files (.libs and .dlls) from your Leap SDK folder to the "Windows" folder. These files are already included for OS X users, because OS X is 64-bit only.
12
+
4.`cd` to the directory all this stuff is in and run `python PyLeapMouse.py` (minus quotes) or just double-click PyLeapMouse.py if you have your computer configured to launch .py files.
13
+
5.Launch with the --palm argument to run in palm mode (with much more accurate two-handed control).
11
14
12
-
USAGE WITH FINGER MODE (python PyLeapMouse.py --finger) (default):
13
-
Operation is as follows:
14
-
1)Insert your hand into frame.
15
-
2)The forwardmost finger that the program detects is the mouse finger. Where it points, the cursor goes.
16
-
3)Stick your thumb out (see note) to click down, and fold your thumb in to click up.
17
-
4)Using two pointer fingers (e.g. index and middle) goes into scroll mode, which is not very intuitive but shows how it might work. The fingertips must be within a short distance of each other to activate scroll mode.
15
+
###Usage with Finger Mode (python PyLeapMouse.py --finger) (default):
16
+
1. Insert your hand into frame.
17
+
2. The forwardmost finger that the program detects is the mouse finger. Where it points, the cursor goes.
18
+
3. Stick your thumb out (see note) to click down, and fold your thumb in to click up.
19
+
4. Using two pointer fingers (e.g. index and middle) goes into scroll mode, which is not very intuitive but shows how it might work. The fingertips must be within a short distance of each other to activate scroll mode.
18
20
19
-
USAGE WITH PALM MODE (python PyLeapMouse.py --palm):
21
+
###Usage with Palm Mode (python PyLeapMouse.py --palm):
20
22
Operation is as follows:
21
23
One hand in frame: The tilt of this hand moves the mouse.
22
24
Two hands in frame: Left hand controls action.
@@ -25,8 +27,7 @@ Two hands in frame: Left hand controls action.
25
27
Two fingers open: Scrolling. Scrolling with right hand movement.
26
28
This is a somewhat unintuitive method of operation, but I find that it gives exceptionally better control than the most obvious "point-at-screen" method of mouse control. With this two-handed tilt based mode, it is easy to hit and properly engage small buttons, scroll through webpages, etc.
27
29
28
-
29
-
NOTES:
30
+
###Notes:
30
31
This is a spare-time project, so it's not perfect quality. However, I tried to keep the code clean and readable. Let me know if you find any bugs (which there are certainly at least a few of). You can reach me at will (dot) yager (at) gmail (dot) (what the gmail domain ends in).
0 commit comments