## VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Global Hotkey

### Global Hotkey

This trait adds an action that invokes a Hotkey, usually a keyboard shortcut or Named Key Command for a Toolbar button in the Module window or a Map Window, but it also works for other Hotkeys. For example, you can use it to shuffle a deck via a deck’s "shuffle" Hotkey. Menu Text: Right-click context menu text. If left blank, no context menu item will appear. Key Command: A Key Command or Named Key Command to initiate the action. Global Hotkey: The Hotkey that will be applied. If it is on the Toolbar, then it is the Hotkey assigned to the Toolbar button you wish to activate. Note: Sometimes you may have a deck of cards or pieces that you want shuffled at the start of the game but not auto-shuffled afterwards. You can use this this trait to shuffle the deck during a setup sequence to get your one-time start-up shuffle. EXAMPLE: A Dice Button component has been added to the Toolbar and assigned the Hotkey F2. A Game Piece is given a Global Hotkey trait with Menu text Roll Dice, Keyboard Command CTRL+R and Global Hotkey F2. Now, selecting the piece and typing CTRL+R or selecting Roll Dice from the right-click context menu will roll the dice button just as if the player had clicked the button in the Toolbar or typed F2 from the keyboard. | When Ctrl+H pressed, send F2 to the Toolbar