v3.3.3.-beta1 (Mac) - Command key failing as a Global Hotkey

V3.3.3 breaks the dice rolling function in current C&C modules (ancients, medieval, napoleonic) on Mac.

The bug disappears if the Mac Legacy option is selected in Preferences. The problem will also disappear if the Dice Hotkey is changed from Control+X to some non-Control key.

The root cause is that a Global Hotkey trait is failing when the target Hotkey is Cmd+X on Mac under Vassal 3.3.3 with the Mac Legacy Preference left unchecked. The same component will respond to Control+X in any other configuration.

The attached demonstration helps see the problem:-
[attachment=0]v3.3.3 hotkey demo.vmod[/attachment

To demo, start a game press the simple die button (the white die). If it responds, “ROLLED!” will be reported to the chat window. This seems to work consistently, showing that the die button itself is responding to Cmd+X (try pressing Cmd+X from the board, it should also work).

Now press one of the black die buttons to roll between 1 and 3 die. In working conditions, the “ROLLED!” message will appear for each die roll along with the die results. In error conditions, only the die “result” is reported and it is always identical (i.e. no actual die roll occurs).

The critical component in the demo is the Global Hotkey trait within the “dicecache” piece. Each die rolled from the black buttons ends up sending the Shift+1 Keyboard Command to activate this trait which, in turn, should send the Global Hotkey, Control+X, which will cause the actual roll (and the “ROLLED!” message) from the Dice component. It seems that, in Mac “Command” key mode, the Global Hotkey Cmd+X is not reaching the dice component when triggered in this way.

Mark

Thx! We’ll either make this work a LOT better or we’ll pull it back out for now.