# Global Key Command to a Deck

**URL:** <https://forum.vassalengine.org/t/global-key-command-to-a-deck/248>\
**Category:** Module Design\
**Created:** [February 7, 2008, 11:16pm UTC](https://forum.vassalengine.org/t/global-key-command-to-a-deck/248 "2008-02-07T23:16:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [February 7, 2008, 11:16pm UTC](https://forum.vassalengine.org/t/global-key-command-to-a-deck/248/1 "2008-02-07T23:16:29Z")

</div>

Hi Dave,

> [@](#):
>
> Your response, however, brought something else to light. Why is there  
> no hotkey for reversing a deck?
> 
> Is there some way to do this ‘remotely’? In the module I’m making,  
> there is an opportunity to draw two cards and place 1 on the bottom of  
> the draw deck. Normally, I just treat the discard deck as the bottom of  
> the deck, but here it is important because the draw deck does not get  
> reshuffled until all the cards have been drawn. So, I need to ensure  
> that the card I placed on the bottom of the deck is seen before the  
> cards already in the discard pile.
> 
> My thought was to have a key command that would reverse the deck, send  
> the card to the deck, then reverse it again. Without a hotkey, I don’t  
> think I can do this…

While there is no Hot Key to reverse a Deck at the moment, what you actually want is a way to return a piece straight to the bottom of the Deck, rather than have to muck around with Hot Keys and Reversing the Deck.

While a ‘Send to bottom’ option could be added to the Return To Deck trait, the programming for this is actually quite complicated.

However, there is a neat way to implement ‘Return to Bottom of Deck’ using a Trigger Action trait. A Deck is just a special form of a Stack and the Stack manipulation commands (arrow keys) work for counters in a Deck.

Say your Return To Deck trait is Ctrl-R. Add a Trigger Action ‘Return to Bottom of Deck’ that issues two Key Commands:

1. Ctrl-R to return the counter to the Deck.
2. Down-Arrow to send the counter to the bottom of the Deck.

Regards,  
Brent.
