Skip to content

fix: SG-41698: Add Alt modifier check for mouse wheel events#1060

Open
tjjackson wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
dreamworksanimation:alt_mouse_wheel_event
Open

fix: SG-41698: Add Alt modifier check for mouse wheel events#1060
tjjackson wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
dreamworksanimation:alt_mouse_wheel_event

Conversation

@tjjackson
Copy link
Contributor

Linked issues

Summarize your change.

Added a check for Alt modifier to QTTranslator::sendMouseWheelEvent()

Describe the reason for the change.

The Alt key combined with the mouse wheel triggers horizontal scrolling, and will be reported in angleDelta().x() instead of angleDelta().y(). I added a check for the Alt modifier for whether to use angleDelta().x() or angleDelta().y() as the delta for determining if the wheel is moving down or up.

Describe what you have tested and on which operating system.

Successfully tested on Rocky Linux 9.5

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

Signed-off-by: TJ Jackson <tj.jackson@dreamworks.com>
@bernie-laberge bernie-laberge changed the title Add Alt modifier check for mouse wheel events SG-41698: Add Alt modifier check for mouse wheel events Jan 14, 2026
@bernie-laberge bernie-laberge added the community Contribution from the Open RV Community label Jan 14, 2026
Copy link
Contributor

@bernie-laberge bernie-laberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tjjackson !

Signed-off-by: TJ Jackson <tj.jackson@dreamworks.com>
@eloisebrosseau
Copy link
Contributor

eloisebrosseau commented Jan 16, 2026

@tjjackson I think you forgot to format your code. You can use pre-commit like mentioned in the documentation. To manually trigger it, you can run pre-commit run clang-format --all-files and commit the fix

@bernie-laberge
Copy link
Contributor

Sorry @tjjackson, the formatting error was my bad: the formatter hadn't ran on the code I proposed to you because I never committed it.
After installing the pre-commit:
pre-commit install
The pre-commit run clang-format --all-files should format the it correctly : it should remove the extra space after the horizontalModifier =.
Thanks !

Signed-off-by: TJ Jackson <tj.jackson@dreamworks.com>
@tjjackson
Copy link
Contributor Author

Yeah I copied-pasted it and didn't think to run pre-commit again, should be good now

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates OpenRV’s Qt event translation so mouse wheel “up/down” direction is derived from the correct QWheelEvent::angleDelta() axis when a horizontal-scroll modifier is pressed (Alt on Linux/Windows, Shift on macOS).

Changes:

  • Add platform-specific modifier selection to detect horizontal scrolling for wheel events.
  • Use angleDelta().x() instead of angleDelta().y() when the horizontal-scroll modifier is active.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title SG-41698: Add Alt modifier check for mouse wheel events fix: SG-41698: Add Alt modifier check for mouse wheel events Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Contribution from the Open RV Community tracked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants