godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.85k stars 20.99k forks source link

Property Editor/Expand All keyboard shortcut doesn't work anymore #93009

Open schneediener opened 3 months ago

schneediener commented 3 months ago

Tested versions

System information

Windows 10

Issue description

If you set the keyboard shortcut in Editor Settings > Shortcuts > Property Editor > Expand All, then try to use that keyboard shortcut, it does not expand all of the property dropdowns for a given node.

If you instead click on a node, go over to the Property Editor, and click the Tool option in the top right, then Expand All, it works. So the Action called Expand All is functional - it's just that the keyboard shortcut doesn't get through.

I've tried with multiple keyboard shortcuts and I've set the same shortcuts for other actions and had them trigger without any issue. It appears (from my user-based testing) to be specific to this Expand All shortcut.

I also tried clearing my old app data/editor settings for godot and re-trying but to no avail.

Steps to reproduce

Minimal reproduction project (MRP)

N/A

schneediener commented 3 months ago

It appears that the command is unable to run when the Property Editor isn't "selected" But please note, there are situations where the Property Editor seems very much "selected" but still doesn't work for example, if you click/highlight the name of a field in the Property Editor such that it lights up, the command still doesn't work (see below): image

But then - if you select the Value of a field (see below) the focus seems to change properly and NOW the keyboard shortcut works image

So maybe the issue is that, in later versions, some requirement (or unintended side effect) has made it so that the Expand All command can only execute if the area is selected - and selecting the area is really hard. Is this intentional?

schneediener commented 2 months ago

I've been running across other examples - it seems that after a certain version (4? ish) keyboard shortcuts seem to only work in certain 'focuses'. So if you've selected an element in one area, keyboard shortcuts for another area won't work.

It seems like a straight downgrade, I could only assume it was done to try and make shortcuts work more contextually? But it's broken a ton of shortcuts almost entirely.

Calinou commented 2 months ago

It seems like a straight downgrade, I could only assume it was done to try and make shortcuts work more contextually? But it's broken a ton of shortcuts almost entirely.

This was done by design in 4.0, since a lot of shortcuts unnecessarily took focus over the whole editor. That behavior broke things such as pressing Delete in various contextual editors and it removing nodes instead (due to the Scene tree dock's shortcut).

Each node can define a shortcut context to allow shortcuts to run in a more global manner, but it needs to be carefully done, especially when custom shortcuts or macOS overrides are considered.