aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

Arctic: Mouse right-click does not work unless button order is changed

Open adamfarley opened this issue 4 months ago • 0 comments

Summary When Arctic records a right-click, it will not replay that right click.

Details If you enter player.properties and swap the values for button2 and button3, the replay will create right-clicks when it should.

Also, when you look at the zipped Events.json event entry for a right-click, you can see that it is registered as a "button2" event. This seems inconsistent with the typical Java approach:

  • Button 1: Always the left-click.
  • Button 2: Always the middle button (left empty if it's a 2 button mouse).
  • Button 3: Always a right-click.

Also, "InputEvent.getMaskForButton(3)" indicates a bit mask offset of 12 (4096, or $1*2^{12}$ ), so I think the default player.properties value is correct, we just need to alter the recorder somehow so that right-clicks are correctly recorded as a button3 event.

Useful Links

Default player.properties: https://github.com/corretto/arctic/blob/66f43e45d1e09e6ec086ea54ef74f949f30e2a32/player/src/main/resources/player.properties#L107

Where recordings are turned into player mouse events: https://github.com/corretto/arctic/blob/main/player/src/main/java/com/amazon/corretto/arctic/player/backend/impl/AwtRobotMouseBackendPlayer.java

adamfarley avatar Jun 17 '25 15:06 adamfarley