adoptium / adoptium/aqa-tests

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

Open
#6,343 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
155
Forks
346
Avg merge
2d 9h
Merged PRs (30d)
36

Description

**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

Contributor guide

Open the contributing guide

Research direction

Start with player/src/main/resources/player.properties and player/src/main/java/com/amazon/corretto/arctic/player/backend/impl/AwtRobotMouseBackendPlayer.java, then trace how the recorder assigns mouse button numbers. Confirm the recorded Events.json entry and replay behavior for a right-click; done means right-clicks are recorded as button3 and replay correctly without changing button2 or button3 settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop-dev, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.