Open hsandt opened 1 year ago
I think we should give priority to any meaningful shortcut when Scene tree is focused. The only feature we'd "lose" is if the user really wants to search for a node whose name starts with F. But I suppose the default for 2D was switched to Shift+F precisely to distinguish the two use cases (and reversely, a user could decide to revert it to F as it's the most common operation, and only press "Shift+F" to search for a node whose name starts with F).
I'm not fond of having incremental search work for all letters except F. I'd prefer changing the shortcut to focus the selection instead (even though I like F for that purpose).
There is indeed a choice to make about priority, when we enable Scene View shortcuts while Scene Tree is focused. Ideally we'd let the user set their favorite context to detect a shortcut, but that requires a more elaborate shortcut editing system (like VS Code).
Otherwise, we must hardcode priority in advance, but then we must make a statement and align all default shortcuts to match this (I'm thinking about Shift+F for 2D vs F for 3D in particular).
I also realized there are other pure letter shortcuts like the transform tools QWER... I didn't really pay attention to it so far because I generally focus the scene when moving nodes around, but I could imagine a user selecting a node in the Scene Tree then W to translate it. I just checked Unity and... it doesn't have node selection by first letter at all.
To sum up the possibilities: a. Any existing shortcut gets priority over name search. In this case, we allow Shift + Letter to still search Letter. Advantage: we can use F, QWER, etc. Disadvantage: we cannot search nodes whose names start with just F, QWER, etc. but it's possible using Shift + Letter. b. Any simple letter press always searches nodes by name. However shortcuts with modifier (including Shift this time) work even when Scene Tree is focused. Advantage: searching node is consistent. Disadvantage: just F won't work, but user can always add a shortcut Shift+Letter to make it work. While Shift+F is OK, they probably won't want to use Shift+QWER for every transform tool, but Godot allows to add additional shortcuts, so they could be added as alternative shortcuts. c. Add an option to switch priority between a. and b. d. Add an option to disable searching nodes by node when typing letter entirely. Better combined with a. Users who don't need node search by first letter can check the option so they can just use F to focus.
Options c and d require more work, but that's much less work that a full VSCode-style shortcut editor with custom context field.
I'm also struggling with this in Windows, having a hard time locating nodes on the scene.
Godot version
v4.0.2.stable.official [7a0977ce2]
System information
Linux Ubuntu 22.04 with Unity desktop
Issue description
Moved from https://github.com/godotengine/godot-proposals/discussions/6853
Most of the time, when I use the 2D Frame Selection shortcut F (or Shift+F, apparently the new default) or 3D Focus Selection F, I have just selected the node in the Scene tree (otherwise I would already have it in scene view), so the Scene tree is focused. Pressing the shortcut at that moment will fail to focus on selection. If the shortcut is one letter (optionally with Shift), the Scene tree panel will focus the next node whose name starts with that letter (e.g. Floor) instead.
Inconsistency:
To make Focus truly work, you must click on the Scene view first, then use the shortcut, but it's cumbersome.
I think we should give priority to any meaningful shortcut when Scene tree is focused. The only feature we'd "lose" is if the user really wants to search for a node whose name starts with F. But I suppose the default for 2D was switched to Shift+F precisely to distinguish the two use cases (and reversely, a user could decide to revert it to F as it's the most common operation, and only press "Shift+F" to search for a node whose name starts with F).
I suppose this could then be documented somewhere.
Also, if we really want to support first letter searching we should fix the bug that blocks it sometimes, to make it work reliably.
Steps to reproduce
Minimal reproduction project
N/A