Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zooming with ctrl + MouseWheel does not work as expected on a Mac #401

Closed
quadruple-output opened this issue May 16, 2021 · 2 comments · Fixed by #402
Closed

Zooming with ctrl + MouseWheel does not work as expected on a Mac #401

quadruple-output opened this issue May 16, 2021 · 2 comments · Fixed by #402
Labels
bug Something is broken native-glium Relates to running egui_glium on native

Comments

@quadruple-output
Copy link
Contributor

Describe the bug

Holding CTRL while turning the mouse wheel is translated to a Zoom event. This is correct on Windows, but on a Mac the correct modifier key would be Command rather than CTRL.

(On a Mac, the combination CTRL+Wheel is captured by the OS and triggers a full-screen zoom.)

To Reproduce
Steps to reproduce the behavior:

  1. On a Mac: cargo run -p egui_demo_app
  2. Open the "Plot" demo
  3. try zooming with Command+MouseWheel (only moves but does not zoom) or CTRL+MouseWheel (triggers hardware full-screen zoom which is not desired)
@quadruple-output quadruple-output added the bug Something is broken label May 16, 2021
@emilk
Copy link
Owner

emilk commented May 17, 2021

Ctrl+wheel is not captured by MacOS for me. I'm on macOS Mojave 10.14.6. Maybe it's something I disabled way back, I can't remember.

I picked ctrl-scroll because that's how I zoom in Firefox, but I notice cmd-scroll also works. Perhaps egui_glium should treat both as a zoom event?

@emilk emilk added the native-glium Relates to running egui_glium on native label May 17, 2021
@quadruple-output
Copy link
Contributor Author

Oh, ok… I am glad you tested this on your machine.

Keybindings on the Mac often surprise me. I think I found the setting that makes the difference for me: System Preferences → Accessibility → Zoom → [/] Use scroll gesture with modifier keys to zoom (can be configured as "Control", "Option", or "Command")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken native-glium Relates to running egui_glium on native
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants