# VASSAL Reference Manual

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

## Global Hotkey

This trait adds an action that invokes a Hotkey, i.e., a keyboard shortcut or Named Key Command for a Toolbar button in the Module window or a Map Window. Essentially it allows a piece to activate a function from the Toolbar.
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 to the Toolbar -- in other words the Hotkey assigned to the Toolbar button you wish to activate.
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