-
-
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
Fix #12544, arrow keys selecting objects in scene hierarchy #12795
Conversation
…ted in the scene hierarchy when navigating with arrow keys through the scene tree.
This will make multi-selecting in tree's by keyboard impossible. By default in |
SELECT_MULTI doesn't seem to work anyway with 2D Nodes or anything descended from CanvasItem that brings up the 2D screen. Try to multi select in a 2D scene using the keyboard and you'll find you can't. This bug fix makes the 2D node behaviour consistent with the 3D mode behaviour. More to the point, the bug exists because having keyboard multi select by default is counterintuitive for new users. Such can be seen when you watch the video attached to the original bug report. Having said that, I admit that keyboard multi-selecting is disabled by this bug fix. Could you give a better idea of how much this function is used? Maybe there's a way both styles could be accommodated. |
If you place a tree in a scene set the selection mode to But I agree that when navigating the SceneTree it should be consistent and select nodes by default. The problem is An idea might be to move the more advanced behaviour behind Ctrl so: Ctrl+Up / down / left / right - will move and not select items. This could then allow eventual support for Shift selection. |
I've been looking around and don't know how to change the SELECT_MULTI variable from within the GUI. In any event, my code changes strictly deal only with keyboard ARROW key input. Multiple item selecting with Ctrl+mouse and Shift+mouse work perfectly well. And moving with Ctrl+Arrow Key works fine too. So really, the question boils down to this: If you select multiple items, and press an Arrow key, should the items stay selected, only one item be selected, that item being the next one down from the last selected object? I argue that it should. For one, this is exactly how Windows Explorer interface works: Select multiple file icons, press an arrow key, and it'll go back to only one item being selected. It's what users expect. Second, I believe this is how Unity works, another thing people expect. Thirdly, so far we've got a YouTube video by a game developer arguing in favour of it and an actual bug report filed to support this behaviour. Honestly, the key question is "What will make the Godot interface more user friendly, especially to newbies who will be checking it out once 3.0 hits?" I believe that this fix supports that aim. |
You currently have to do it though GDScript with the following:
Ahh just tested Ctrl+Arrow Keys move the children around so we can't use that shortcut - well we could change it to use Alt or place the keyboard multi-select behind Alt. I agree with the rest. |
This seems like a pretty bad hack, and current behavior is fine. |
what could change is by default calling select_single_item unless shift is pressed, though. |
or maybe space is multi select and return is select single. |
If "current behavior is fine" why was bug #12544 filed in the first place? |
I don't think the current behaviour is fine, what's shown on that video is quite unintuitive. Let's look for a better fix. |
Thank you @akien-mga for re-opening this issue. I think new users will find this very useful and also regular users will find this way more convenient. It's important to have a low frustration level when using a software as it was showed on the youtube video. |
I'm glad this issue has been reopened, thank you. So should this pull request be accepted? |
Thanks a lot for your contribution! Moving this PR to the 3.1 milestone, to be reviewed once the release freeze is lifted. It could eventually be cherry-picked for a future 3.0.1 maintenance release if it doesn't change the user-facing APIs and doesn't compromise the engine's stability. |
(And sorry for the delay on this PR, there are a lot of PRs to handle daily and the status on this one so far is that @reduz is not happy with the proposed fix, even though we agree that there is an issue to fix - so more work will be needed). |
Superseded by #16947. |
Please re-open the report, keys are still not working on a 3D project, for example if you create a bunch of meshinstances and try to use the arrow keys you will find that the meshes are not being selected on the viewport. |
Fix for #12544, allowing objects to be automatically selected in the scene hierarchy when navigating with arrow keys through the scene tree.