Ejemplo n.º 1
0
 def mouse_drag():
     """(TEMPORARY) Press and hold/release button 0 depending on state for dragging"""
     # todo: fixme temporary fix for drag command
     button_down = len(list(ctrl.mouse_buttons_down())) > 0
     print(str(ctrl.mouse_buttons_down()))
     if not button_down:
         # print("start drag...")
         ctrl.mouse_click(button=0, down=True)
         # app.notify("drag started")
     else:
         # print("end drag...")
         ctrl.mouse_click(button=0, up=True)
Ejemplo n.º 2
0
 def mouse_sleep():
     """Disables control mouse, zoom mouse, and re-enables cursor"""
     eye_zoom_mouse.toggle_zoom_mouse(False)
     toggle_control(False)
     show_cursor_helper(True)
     stop_scroll()
     if 1 in ctrl.mouse_buttons_down():
         actions.user.mouse_drag()
Ejemplo n.º 3
0
 def on_move(e):
     if not config.control_mouse:
         buttons = ctrl.mouse_buttons_down()
         # print(str(ctrl.mouse_buttons_down()))
         if not e.flags & tap.DRAG and buttons:
             e.flags |= tap.DRAG
             # buttons is a set now
             e.button = list(buttons)[0]
             e.modify()
Ejemplo n.º 4
0
 def mouse_drag():
     """(TEMPORARY) Press and hold/release button 0 depending on state for dragging"""
     if 1 not in ctrl.mouse_buttons_down():
         # print("start drag...")
         ctrl.mouse_click(button=0, down=True)
         # app.notify("drag started")
     else:
         # print("end drag...")
         ctrl.mouse_click(button=0, up=True)
Ejemplo n.º 5
0
    def mouse_drag_end():
        """Releases any held mouse buttons"""
        buttons_held_down = list(ctrl.mouse_buttons_down())
        for button in buttons_held_down:
            ctrl.mouse_click(button=button, up=True)

        if (eye_zoom_mouse.zoom_mouse.enabled and
                eye_zoom_mouse.zoom_mouse.state != eye_zoom_mouse.STATE_IDLE):
            eye_zoom_mouse.zoom_mouse.cancel()
Ejemplo n.º 6
0
    def mouse_sleep():
        """Disables control mouse, zoom mouse, and re-enables cursor"""
        eye_zoom_mouse.toggle_zoom_mouse(False)
        toggle_control(False)
        show_cursor_helper(True)
        stop_scroll()

        # todo: fixme temporary fix for drag command
        button_down = len(list(ctrl.mouse_buttons_down())) > 0
        if button_down:
            ctrl.mouse_click(button=0, up=True)
Ejemplo n.º 7
0
    def mouse_drag():
        """(TEMPORARY) Press and hold/release button 0 depending on state for dragging"""
        if 1 not in ctrl.mouse_buttons_down():
            print("start drag...")
            ctrl.mouse_click(button=0, down=True)
            # app.notify("drag started")
        else:
            print("end drag...")
            ctrl.mouse_click(button=0, up=True)

        # app.notify("drag stopped")

        if (eye_zoom_mouse.zoom_mouse.enabled and
                eye_zoom_mouse.zoom_mouse.state != eye_zoom_mouse.STATE_IDLE):
            eye_zoom_mouse.zoom_mouse.cancel()
Ejemplo n.º 8
0
 def mouse_drag_end():
     """ Releases any held mouse buttons """
     buttons_held_down = list(ctrl.mouse_buttons_down())
     for button in buttons_held_down:
         ctrl.mouse_click(button=button, up=True)