netbeans
netbeans copied to clipboard
Tweak some keyboard behaviors in various platform components
Here are a couple of smaller improvements, relating to keyboard shortcuts in various platform components. I have left each improvement as a separate commit since they are technically unrelated:
- Make the accelerators for MoveWindowLeftAction/MoveWindowRightAction show up properly in the context menu that shows up when you right-click an editor tab.
-
- On MacOS, add Command+O as a shortcut for Open (default action) in TreeView (Projects, Files tabs etc.), like in Finder.
- In TreeView and OutlineView, improve the position of the context menu when opened via the keyboard accelerator (Shift+F10).
- Before:
- After:
- Before:
- Make F2 to rename work on MacOS on TreeTable/TreeView/ETable. (It already works on Windows.)
@matthiasblaesing Thanks for reviewing!
I missed the "Go to Type" mapping... in fact Command+O does map to "Go to Type" on MacOS.
I can remove that part of the PR. Or, I can alternatively keep the current behavior, which is that Command+O will open a file if keyboard focus is in the Projects or Files sidebars, while invoking the global shortcut (Go to Type) if keyboard focus is e.g. in the editor area.
I think it would be good to keep Command+O bound as is to keep it consistent between platform. I understand, that that is the case with this PR, so I think it would be good to get this in soon.
As in, merge the PR as it is, without changes?
(Sorry, my confusion...)
I meant, that I think it is good that an application tries to be consistent in itself. I.e. the application works similar on all platforms. As Command and CTRL are filling the same role on mac OS and Windows/Linux, I think the established NB internal mappings should take precedence. My understanding of
I missed the "Go to Type" mapping... in fact Command+O does map to "Go to Type" on MacOS.
was that Command+O is still bound to "Go to Type", if that is not the case, I think, that that should be removed.
was that Command+O is still bound to "Go to Type", if that is not the case, I think, that that should be removed.
Command+O is still bound to "Go to Type", except if the keyboard focus is in the Projects or Files sidebars. In that case it would behave like in Finder on MacOS.
But I can just remove the Command+O commit, so the shortcut doesn't end up have two different meanings within the same app.
But I can just remove the Command+O commit, so the shortcut doesn't end up have two different meanings within the same app.
Yes, I think that would be better.
OK, I removed the Command+O commit with no other changes, and rebased. Will wait for tests to pass, then merge. Thanks for reviewing!