

def _handle_mouse(self, ev):
    '\n        Handle mouse events. Return a list of KeyPress instances.\n        '
    FROM_LEFT_1ST_BUTTON_PRESSED = 1
    result = []
    if (ev.ButtonState == FROM_LEFT_1ST_BUTTON_PRESSED):
        for event_type in [MouseEventTypes.MOUSE_DOWN, MouseEventTypes.MOUSE_UP]:
            data = ';'.join([event_type, str(ev.MousePosition.X), str(ev.MousePosition.Y)])
            result.append(KeyPress(Keys.WindowsMouseEvent, data))
    return result

dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/terminal/win32_input.py ConsoleInputReader._handle_mouse/original