# Template Event Handlers - Events in template and template instance

**URL:** <https://forum.inductiveautomation.com/t/template-event-handlers-events-in-template-and-template-instance/20831>\
**Category:** Ignition\
**Created:** [November 14, 2018, 1:28am UTC](https://forum.inductiveautomation.com/t/template-event-handlers-events-in-template-and-template-instance/20831 "2018-11-14T01:28:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [November 14, 2018, 1:57pm UTC](https://forum.inductiveautomation.com/t/template-event-handlers-events-in-template-and-template-instance/20831/2 "2018-11-14T13:57:53Z")

</div>

In the mouseClicked event of the template you can dispatch the mouse event to the templates parent.

```auto
from java.awt.event import MouseEvent
evt = MouseEvent(
		 event.source.parent
		,event.getID()
		,event.getWhen()
		,event.getModifiers()
		,event.x
		,event.y
		,event.clickCount
		,event.popupTrigger
		,event.button)
event.source.parent.dispatchEvent(evt)	

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/template-event-handlers-events-in-template-and-template-instance/20831)._
