scenebuilder
scenebuilder copied to clipboard
fix: Zoom-in/out using keyboard shortcut not working correctly
Zoom-In/Out was supposed to work with keyboard shortcuts.
For Zoom-In MODIFIER
++
and for Zoom-Out MODIFIER
+/
were defined.
The predefined KeyCombinations were not working, there seems something wrong with how KeyCodes are handled especially on macOS but also on Windows. This might become an issue for OpenJFX which is a separate thing.
I've played a while with suitable settings which work on Win/Mac/Linux and settled with following idea:
Platform(s) | Accelerator | Action | Preview | App (with GER keyb. layout) |
---|---|---|---|---|
WIndows, Linux | CTRL ++ |
Zoom In | ok | |
WIndows, Linux | CTRL +- |
Zoom Out | ok | |
WIndows, Linux | CTRL ++ (on num key pad) |
Zoom In | ok | |
WIndows, Linux | CTRL +- (on num key pad) |
Zoom Out | ok | |
macOS 12.0.1 | CMD ++ |
Zoom In | ok | |
macOS 12.0.1 | CMD +- |
Zoom Out | ok | |
macOS 12.0.1 | CMD ++ (on num key pad) |
Zoom In | ok | |
macOS 12.0.1 | CMD +- (on num key pad) |
Zoom Out | ok |
Platform(s) | Accelerator | Action | Preview | App (any keyb. layout with cursors) |
---|---|---|---|---|
WIndows, Linux | SHIFT +CTRL +up |
Zoom In | ok | |
WIndows, Linux | SHIFT +CTRL +right |
Zoom In | ok | |
WIndows, Linux | SHIFT +CTRL +left |
Zoom Out | ok | |
WIndows, Linux | SHIFT +CTRL +down |
Zoom Out | ok | |
macOS 12.0.1 | SHIFT +CMD +up |
Zoom In | ok | |
macOS 12.0.1 | SHIFT +CMD +right |
Zoom In | ok | |
macOS 12.0.1 | SHIFT +CMD +left |
Zoom Out | ok | |
macOS 12.0.1 | SHIFT +CMD +down |
Zoom Out | ok |
The DocumentWindowController
offers a mainKeyEventFilter
where those double accelerators can be tracked.
All key handling happens in MenuBarController
but this is called from mainKeyEventFilter
in DocumentWindowController
.
Issue
Fixes #424
Progress
- [x] Change must not contain extraneous whitespace
- [x] License header year is updated, if required
- [x] The PR name must follow the pre-defined format
- [x] Verify the contributor has signed Gluon Individual Contributor License Agreement (CLA)