v3.4.x change in Meta/Cmd key behaviour

v3.4.x introduced a naming change for MacOS keys, so now for example, in the Editor, “Cmd” is used to denote the Mac Command key in keyboard command and hotkey fields. Previously, the Mac Command key was called the META key, and I believe was equivalent to the PC Windows key.

Since this change, when I use a Command key combination for a function, it seems that my PC users have no equivalent.

Did, in fact, something change that might have caused this ?

What is the PC equivalent to the Cmd key, if any, in Vassal v3.4.11 ?


We changed the display name of the Command key (just changed the string we display), but we’re still detecting the same Java key code as before. As far as a Windows equivalent, I’m not sure there is one. It’s possible that some versions of Java treat(ed?) the “Windows key” as a meta key, but it’s also possible that this treatment changed between the old Java 8 that Vassal 3.2.17 ran on and the much newer Java that we run now. I know for sure that Java changed the “isMetaDown()” behavior as far as the MOUSE is concerned (that used to be a way to detect “right clicks”) and we had to rewrite a bunch of code to account for it.

You may recall we had experimented with that Command/Control translation stuff in the early betas for 3.4, as a way to bring more standardization of interfaces across platforms and bring the Mac version a little closer to a “normal” Mac interface (so that Command on Mac would be equivalent to CTRL on PC/Linux, as it “mostly, traditionally, is”), but that got bogged down so we ended up just leaving it alone.

I would actually be fascinated to have it definitively confirmed whether or not “Windows Key” really works in 3.2.17 as “Meta” (and whether or not it works as Meta in 3.4.x). I’m pretty sure that if there is a difference, however, it is because of change in Java.

I see in current Java documentation on the Oracle site, that VK_WINDOWS and VK_META have very different values – that isn’t definitive, but it certainly doesn’t suggest them as equivalents.

In lightly researching this, here is one example of the kind of discussion I find – youtrack.jetbrains.com/issue/IDEA-144702 – tends to suggest this is a bit of a hellscape, java-wise, and that “Windows as META” isn’t really very feasible. :open_mouth: One way or another, the biggest challenge is that there are apparently only three “modifier keys” recognized by Java on Windows – Ctrl, Shift, Alt.

We still have all the code from the Command/Ctrl translation stuff and we could always crank that back up if there was a big push from our Mac users to change Command’s behavior, but we’d want to at least get a reasonable amount of consensus from you guys about it, and there were obviously some tradeoffs.

“Another Adventure In Cross-Platform Development!”


I’m not trying to second-guess any design decisions, but I’m just curious–are users genuinely wanting to use a key combination to execute this particular command as opposed to activating through the right-click context menu? If so, do you have a rough sense of the percentage of users that want/need this to be keyboard-activated?

Though I have no data to back it up, I’ve always had a hunch that it would be really challenging for users to internalize key commands and actually use them a lot. There is no standardization across modules, and in some modules there are so many things you can do to pieces that there can be a proliferation of CTRL, ALT, CTRL-ALT, etc commands. I guess if you are a heavy user of one particular module and there are a couple actions that you really do a lot of (flip, eliminate, etc) it can make sense to take the time to memorize those and use the keyboard.

There are just a lot of different use cases depending on players’ personal idiosyncracies.

I play PoG all day long and often have 6 games going at once, so I am quite good with the key commands :slight_smile: