Tip: Arrow keys as a Key Commands (especially stackable pieces)

Somewhere it is documented that Vassal uses the arrow keys (left, right, up, down) for navigating between pieces in a stack. Handy to know as a player, if you want to access the menu of a particular piece in a stack.

Therefore, module developers should avoid using these keys as Key Commands. e.g. users of a module that uses these keys for “rotate” will find that they cannot rotate a stack or a piece within a stack without changing the stacking order. Users will then find themselves constantly unstacking and re-stacking pieces.

On a positive note, these the arrow keys are effectively built-in key commands and can be used programmatically. A typical use would be to move a piece to the top or bottom of the stack it is moved onto. This example from the Commands and Colors: Medieval module (Unit prototype) results in the piece moving to the bottom of the stack (the trigger key command is the movement key command defined for the map window).