-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add editor shortcuts to toggle bottom panel visibility #88081
Add editor shortcuts to toggle bottom panel visibility #88081
Conversation
I feel like a default shortcut set for every single one of those panels is overkill. Outside of the always-present 5 ones, it is also extremely unlikely that all these panels will be open at the same time If it is later planned to use any of those Alt combinations for anything else it becomes much harder to argue with (Script Editor's |
Should we add them to the command palette as well? Since there are commands to switch main screens. |
1cb950c
to
792d36b
Compare
Yeah I agree with @Mickeon, it's probably best to leave all of the non-persistent buttons unbound and let the users bind what they need. For example I'd rarely need a hotkey for TileMap just because I don't make 2D games, Replication is only needed if you make multiplayer games, etc etc |
I can change the permanent bottom panels' shortcuts to take priority over the temporary ones (in the sense that permanent bottom panels would always use the first letter as their shortcut). By the way, perhaps permanent bottom panels should be displayed differently from temporary bottom panels. Regarding shortcuts that only use Alt as a modifier, we don't have a lot of those right now. We'd probably have much more if we had proper support for accelerators / access keys, but there are no known plans to implement those in the short term. |
So first I'm not sure if this a problem per se but they are two bottom panel associated with |
There are some default shortcuts on Mac that are different for similar reasons, so they would need to either be something else on that platform or stripped out entirely. |
Can we include a shortcut to toggle? Hide current panel if visible, otherwise show last open panel. Doesn't need a default mapping but I think it's worth one. Similar thing in VSCode is ctl-j not sure why J but it does seem free to map. |
Done. I've also renamed shortcuts to make them easier to search.
Good idea; I've added Ctrl + J to toggle the last opened bottom panel. |
792d36b
to
03c4384
Compare
Needs rebase. |
03c4384
to
19caad0
Compare
Rebased and tested again, it works as expected. |
Needs a compat method binding:
|
19caad0
to
f5994a6
Compare
8411a45
to
71f7511
Compare
71f7511
to
e7ee515
Compare
I'm getting some merge conflicts when trying this PR with master, is this meant for 4.3 rebase or some later 4.X version perhaps? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not a fan of adding that many shortcuts, but it has some merits it seems. Though if shifting button positions are the problem, we could rework it to make them more stable (e.g. always add new buttons at the end and allow rearranging them).
Code-wise looks fine.
e7ee515
to
1cdab2d
Compare
Rebased and squashed with the review suggestions incorporated. |
1cdab2d
to
9e1a7ad
Compare
I want to echo that, I feel adding a default unique hotkey to every single panel, even some which are very contextual and only appear when a specific node is selected (like Replication, etc.) is overkill. I would only set default hotkeys for the panels which are always present: Output, Debugger, Audio, Animation, Shader Editor, and now FileSystem since it can also be moved to the bottom panel. The rest can have shortcuts without a default binding, so users who need them can set their own preferred bindings (e.g. for TileMap / TileSet for users who do tiles-based 2D games, or Replication for users making multiplayer games with the high level multiplayer API). |
Done. |
I see the shortucts are still there 🤔 |
Hm yes you forgot to push :P |
9e1a7ad
to
49c79b8
Compare
Default shortcuts use the first or second letter of each word. This also adds a new shortcut to toggle the last opened bottom panel. On editor startup, this defaults to the first panel in the list (which is the Output panel).
49c79b8
to
8221e75
Compare
Thanks! |
Does https://docs.godotengine.org/en/4.3/tutorials/editor/default_key_mapping.html need updating? |
Default shortcuts typically use the first or second letter of each word (with a few exceptions such as TileMap and TileSet to ensure consistency). Editor plugins can also specify shortcuts for their own bottom panels.
This also adds also a new shortcut to toggle the last opened bottom panel. On editor startup, this defaults to the first panel in the list (which is the Output panel).
All shortcuts are nearly organized in their own section of the Editor Settings Shortcuts dialog for easy access, and are also available in the command palette:
One issue is that the individual toggle shortcuts don't work if you're currently focusing on the Tree node in either the scene tree dock or FileSystem dock. Shortcuts will work if you're focused on their filter LineEdits though. I've tried to use
tb->set_shortcut_context(nullptr)
to no avail.Preview
editor_bottom_panel_shortcuts.mp4
The shortcut appears in the tooltip when the button is hovered: