Exemplo n.º 1
0
        tracker.register('gaze', mouse.on_gaze)
        
        # turn circle back on if it was on previously?
        if mouse.alpha == not_transparent:
            canvas.register('overlay', mouse.draw)
            
    mouse.enabled = not mouse.enabled

def toggle_circle():
    mouse.alpha = not_transparent if mouse.alpha == transparent else transparent
    if mouse.alpha == transparent:
        canvas.unregister('overlay', mouse.draw)
    else:
        canvas.register('overlay', mouse.draw)

def toggle_demo():
    mouse.size = demo_size if mouse.size == regular_size else regular_size

context.keymap(
    {
        # "shit": lambda m: mouse.enabled and click(),
        "(kill | toggle) circle": lambda m: mouse.enabled and toggle_circle(),
        "(kill | toggle) eyes": lambda m: toggle_watcher(),
        "presentation mode": lambda m: mouse.enabled and toggle_demo(),
        # old stuff
        'control mouse':   lambda m: eye_mouse.control_mouse.toggle(),
        'camera overlay':  lambda m: eye_mouse.camera_overlay.toggle(),
        'run calibration': lambda m: eye_mouse.calib_start(),
        'calibrate eyes': lambda m: eye_mouse.calib_start(),
    }
)
Exemplo n.º 2
0
 def mouse_calibrate():
     """Start calibration"""
     eye_mouse.calib_start()
Exemplo n.º 3
0
# From https://github.com/talonvoice/examples
from talon_plugins import eye_mouse
from talon.voice import Context

ctx = Context("eye_control")
ctx.keymap({
    "debug overlay": lambda m: eye_mouse.debug_overlay.toggle(),
    "pointer": lambda m: eye_mouse.control_mouse.toggle(),
    "camera overlay": lambda m: eye_mouse.camera_overlay.toggle(),
    "run calibration": lambda m: eye_mouse.calib_start(),
})
Exemplo n.º 4
0
def _start_calibration():
    return lambda m: eye_mouse.calib_start()
Exemplo n.º 5
0
 def gaze_calibrate():
     """Calibrate eye tracker"""
     eye_mouse.calib_start()
Exemplo n.º 6
0
 def calibrate_tracker():
     """Run eye tracker calibration."""
     eye_mouse.calib_start()
Exemplo n.º 7
0
# From https://github.com/talonvoice/examples
from talon_plugins import eye_mouse
from talon.voice import Context

ctx = Context("eye_control")
ctx.keymap({
    "debug overlay":
    lambda m: eye_mouse.debug_overlay.toggle(),
    "(control mouse | i track | i pee | toto)":
    lambda m: eye_mouse.control_mouse.toggle(),
    "camera overlay":
    lambda m: eye_mouse.camera_overlay.toggle(),
    "run calibration":
    lambda m: eye_mouse.calib_start(),
})