Allow Cmd-Shift-M to bring up 3dConnexion Spacemouse Dialog (EXCEPT on "Home" sub-screen) #5598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
this is for issues:
The problem is that hitting "Cmd-Shift-M" on mac always minimizes the app, even though it should only minimize on "Cmd-M", and not on "Cmd-Shift-M".
The code that minimizes (using the WXWidgets "Iconize()" call) happens in MainFrame.cpp keyboard event loop. The code that's checking, looks for "Cmd-M" but does not check for any other keyboard modifiers, so I added a check to ignore the event if Shift is pressed along with "Cmd-M".
There's a secondary issue that isn't really relevant to this bug in that the app will still minimize when pressing "Cmd-Shift-M", but ONLY on the "Home" sub-screen. (all other sub-screens work as they should).
I'm not sure why, but when the "Home" sub-screen is selected, the keyboard event loop (MainFrame.cpp, line 609), is called TWICE when "Cmd-Shift-" is pressed:
evt.GetModifiers()
is set towxMOD_CONTROL
ANDwxMOD_SHIFT
. (this is correct)wxMOD_CONTROL
(this is wrong).I hunted around the code for a long while trying to figure this out, but I don't know much about wxWidgets (and the docs/googling didn't reveal anything), so I wasn't able to fix this root cause.
Again, this double-event (with the wrong modifiers) only happens when the user is on the "Home" sub-screen. For the context of this bug the 3DConnexion preferences dialog isn't needed on the "Home" sub-screen so this secondary bug doesn't really matter. But it does make the UX odd where Cmd-Shift-M will minimize the app when the user is viewing the "Home" sub-screen, but not minimize the app when the user is viewing any other sub-screen.
Screenshots/Recordings/Graphs
Tests
manual testing was done.