def press(button=LEFT):
location = get_position()<EOL>button_code, button_down, _, _ = _button_mapping[button]<EOL>e = Quartz.CGEventCreateMouseEvent(<EOL>None,<EOL>button_down,<EOL>location,<EOL>button_code)<EOL>if _last_click["<STR_LIT:time>"] is not None and datetime.datetime.now() - _last_click["<STR_LIT:time>"] < datetime.timedelta(seconds=<NUM_LIT>) and _last_click["<STR_LIT>"] == button and _last_click["<STR_LIT>"] == location:<EOL><INDENT>_last_click["<STR_LIT>"] = min(<NUM_LIT:3>, _last_click["<STR_LIT>"]+<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>_last_click["<STR_LIT>"] = <NUM_LIT:1><EOL><DEDENT>Quartz.CGEventSetIntegerValueField(<EOL>e,<EOL>Quartz.kCGMouseEventClickState,<EOL>_last_click["<STR_LIT>"])<EOL>Quartz.CGEventPost(Quartz.kCGHIDEventTap, e)<EOL>_button_state[button] = True<EOL>_last_click["<STR_LIT:time>"] = datetime.datetime.now()<EOL>_last_click["<STR_LIT>"] = button<EOL>_last_click["<STR_LIT>"] = location<EOL>
Sends a down event for the specified button, using the provided constants