# Is it possible to trigger on drag and drop?

**URL:** <https://forum.vassalengine.org/t/is-it-possible-to-trigger-on-drag-and-drop/6927>\
**Category:** Module Design\
**Created:** [June 17, 2014, 10:41pm UTC](https://forum.vassalengine.org/t/is-it-possible-to-trigger-on-drag-and-drop/6927 "2014-06-17T22:41:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benkyo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/benkyo/32/3289_2.png) [@Benkyo](https://forum.vassalengine.org/u/Benkyo)\
**Post date:** [June 17, 2014, 10:41pm UTC](https://forum.vassalengine.org/t/is-it-possible-to-trigger-on-drag-and-drop/6927/1 "2014-06-17T22:41:57Z")

</div>

I can’t figure out how to trigger a key command when a piece’s location changes due to drag and drop.

For instance, a piece is moved to deck A, and when that happens I want the piece to trigger key command UP, which will change the active layer of the piece.

---

<div class="post-metadata">

**Author:** ![Benkyo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/benkyo/32/3289_2.png) [@Benkyo](https://forum.vassalengine.org/u/Benkyo)\
**Post date:** [June 18, 2014, 11:06am UTC](https://forum.vassalengine.org/t/is-it-possible-to-trigger-on-drag-and-drop/6927/2 "2014-06-18T11:06:55Z")

</div>

Ah, I think I have it.

The only way is to have a global key command that applies to counters on the map, right?  
And then make a trigger with, for example, CurrentZone conditions, which will specify when the layer change is triggered.

Sorry for the clutter.

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [June 18, 2014, 1:24pm UTC](https://forum.vassalengine.org/t/is-it-possible-to-trigger-on-drag-and-drop/6927/3 "2014-06-18T13:24:44Z")

</div>

Effects that trigger on movement are generally executed by having a map-level keystroke that is applied to all pieces ending movement on the map (this is the very bottom setting in a map window’s properties), then having a Trigger on the relevant pieces that listens for that keystroke and then carries out the desired effects. Like you said, use property matches in the Trigger to restrict them to movement into or out of specific areas.
