Selection issue with Macs

So, not a problem I can help you test, but it seems a recent Mac-related fix has introduced new bugs.

When a player selects a piece, then issues a right-click command to the piece, the command doesn’t work.

When a player simply right-clicks and selects a command, it works, but a previous piece is not deselected, so the command goes to multiple pieces.

Add these two bugs together, and you have some very confused Mac users, by the look of things.

A user sent me a video of this buggy behaviour in action:

icloud.com/attachment/?u=ht … =108445348

How, specifically, is the user selecting an issuing the right-click command?

On my Mac, right-click using Track-pad (by default, a two-finger press) performs fine for me.

However - another way is to use CTRL + a single click on trackpad (also, I believe, mouse). This last method was the subject of a change several vassal releases back.

My brief test indicates that CTRL+click is behaving differently from the trackpad method and is causing the symptoms you report.

Symptom 1 of your description (ie When a player selects a piece, then issues a right-click command to the piece, the command doesn’t work) is occurring because CTRL+Click is de-selecting the piece before it tries to apply the command. I suggest that CTRL+Click is actually toggling the selection status before applying the command - hence “When a player simply right-clicks and selects a command, it works”. By contrast, the other method (two finger press on trackpad) will work regardless of whether the piece clicked on was initially selected. This is the correct behaviour, I believe.

Symptom 2. Again, CTRL+Click and Trackpad+two-finger press forms of Right-Click are behaving differently. If I simply replicate your steps with Trackpad+two-finger press, then the first selected piece is de-selected before the Right-Click command is executed. So, only the second piece gets changed. I suspect CTRL+Click is “wrong”.

Another, example is an explicit multiple selection (drag select or shift-select) followed by right-click command:-
i) CTRL+Click: All selected pieces get the command EXCEPT the piece on which the command is pressed. The selection is dropped on the last piece.
ii) Trackpad two-finger click: The command is executed on all pieces and all pieces remain selected, as expected.

Workaround: If the user has a trackpad, use that with two-finger press (or some other variation - e.g. see here) rather than CTRL+Click.

Mark

Mark, what should we be doing here? I think a “normal Mac app” would use Command+Click for select/deselect? (But of course Vassal is far from a correctly-behaved Mac app, as we all know) – if we put the select/deselect toggle on Command+Click is that going to screw up something else I can’t think of? (But it sounds like the only real alternative is to disable select/deselect toggle entirely).

Brian

And I guess while we’re on the subject of Ctrl+Mouse, we have:
(1) Select/Deselect toggle … currently Control+Click but maybe should be Command+Click?
(2) Mousewheel + WHAT should change zoom level? Command? Control?
(3) Upcoming 3.5 has a “Flare” function that calls opponent’s attention to a place where you left-click, if you use the right set of modifier keys. On most platforms the (configurable) modifier keys are Ctrl and Alt, and/or one of those keys combined with Shift. Which key should stand in for “Ctrl” on Mac for this? (Control or Command)

Brian

  1. Select/Deselect toggle on Mac would normally be Command+Click.
  2. For zooming it could be mousewheel + option (alt) or mousewheel + command, I’ve seen both used (never CTRL).
  3. As per the previous discussion on modifier key substitution for shortcuts I would keep the ‘Flare’ keys as they are on Mac and not replace anything with Command.

Okay super. We will probably make a 3.4.7 in honor of this, but some test builds first.

Hopefully this is the last cleanup from dealing with the Java 8 => 11/14 upgrade for VASSAL, which deprecated VASSAL’s “old way” of detecting certain clicks, and made us have to Put Humpty Dumpty Back Together Again using non-deprecated tools we found lying around the house.

Try VASSAL-3.4.7-SNAPSHOT-969c426bb.

vassalengine.org/~uckelman/tmp/

Does this solve the problem?

Looks ok in my testing; specifically,

  1. CTRL+Click now performs like an actual Right-Click on the trackpad/mouse.
  2. Cmd+Click does select / deselect - I hadn’t noticed that it didn’t do this before but I wasn’t using this.

Mark

I wanted to find time to check some of Brian’s points out before responding. I’ve read the other posts too.
On points (2) and (3), I think these divert from the OP’s original issue, so I will raise different threads for these discussions; hope that’s ok.

On Select/De-Select (and Control-Click): this, I guess, was the original issue and seems now fixed in the snapshot. i.e. Control+Click = Mouse Right-Click; Command+Click=Select/Deselect.

Mark