# Toggle mousedown & mouseup

**URL:** <https://community.folivora.ai/t/toggle-mousedown-mouseup/6235>\
**Category:** Configuration Help & General Discussion\
**Created:** [January 15, 2019, 12:31pm UTC](https://community.folivora.ai/t/toggle-mousedown-mouseup/6235 "2019-01-15T12:31:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [January 15, 2019, 12:44pm UTC](https://community.folivora.ai/t/toggle-mousedown-mouseup/6235/2 "2019-01-15T12:44:12Z")

</div>

This is not easy but it can be done using Apple script and named triggers.

So first you'd create two named triggers in the "Other tab" in BetterTouchTool. One for mouse up and one for mouse down:

 ![image](https://community.folivora.ai/uploads/default/original/2X/a/ab30e4a2c2f9546f276d3a500bde6fce1f7de0f8.png)

Then you'd assign a "Run Apple Script" action to the two finger tap:

 ![image](https://community.folivora.ai/uploads/default/original/2X/5/59873d00bf480b1f1f1e6990f48bcc1e692bba2a.png)

And use this Apple Script:

```auto
tell application "BetterTouchTool"
	set clickState to get_number_variable "ClickState"
	if clickState is 0 then
		set_number_variable "ClickState" to 1
		trigger_named_async_without_response "mouse_down"
		
	else
		set_number_variable "ClickState" to 0
		trigger_named_async_without_response "mouse_up"
	end if
end tell

```

 ![image](https://community.folivora.ai/uploads/default/original/2X/a/aea283f45e4c81209ed4e68a2bcf9f578a8acb8d.png)

---

_[View the full topic](https://community.folivora.ai/t/toggle-mousedown-mouseup/6235)._
