Skip to content
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

Rename node with space key press not working #103466

Open
Tiny-can-WZB opened this issue Mar 2, 2025 · 5 comments
Open

Rename node with space key press not working #103466

Tiny-can-WZB opened this issue Mar 2, 2025 · 5 comments

Comments

@Tiny-can-WZB
Copy link

Tiny-can-WZB commented Mar 2, 2025

Tested versions

-Reproducible in Godot-4.4-beta2 and above
-Not reproducible in Godot-4.4-beta1 and below

System information

Windows11 - Godot-4.4-bata2 and above - Vulken(Forward+)

Issue description

Before Godot-4.4-bata1, when a node is selected(highlighted) in the editor, pressing space key in a keyboard will trigger the renaming of the node, however this no longer works in 4.4-bata2 and above, doing so seems to simply deselect the highlighted node.

Steps to reproduce

  • Create a new scene with any node
  • Select any node in the scene tree with mouse
  • Press the Space key when the node is highlighted

Minimal reproduction project (MRP)

  • Nothing
@BrotherShort
Copy link
Contributor

The bug originates from merge #101842 .
Pressing space key belongs to "ui_accept" action and "ui_select" action.
Before #101842, the tree control code processed "ui_accept" action first, then "ui_select" action. So Pressing space key would go into the if statement dealing with "ui_accept" action, and started rename.
#101842 exchanged "ui_accept" action and "ui_select" action. So Pressing space key will go into the if statement dealing with "ui_select" action, and never start rename.

@Tiny-can-WZB
Copy link
Author

The bug originates from merge #101842 . Pressing space key belongs to "ui_accept" action and "ui_select" action. Before #101842, the tree control code processed "ui_accept" action first, then "ui_select" action. So Pressing space key would go into the if statement dealing with "ui_accept" action, and started rename. #101842 exchanged "ui_accept" action and "ui_select" action. So Pressing space key will go into the if statement dealing with "ui_select" action, and never start rename.

So its intended to work this way?

@akien-mga
Copy link
Member

CC @havi05 @KoBeWi

It seems indeed like it's intentional, but I see how it can be an issue for people used to this workflow.

@akien-mga akien-mga moved this from Unassessed to Not Critical in 4.x Release Blockers Mar 17, 2025
@havi05
Copy link
Contributor

havi05 commented Mar 17, 2025

Currently, I don't have an idea how to support both actions using the same key.

I changed the order of if statements, because previously it wasn't possible to select an item in a tree by pressing a key, but ui_accept has another key mapped (Enter) so at least there would be a way to trigger both actions with the default key mapping.

As a quick workaround, you could change the default key mapping for ui_select in the editor settings.

@KoBeWi
Copy link
Member

KoBeWi commented Mar 18, 2025

As I mentioned in the PR, it fixed an issue for default control scheme (previously you couldn't use ui_select because of overlap). Alternative was remapping either action to a different key, but it's less invasive to change behavior of one node than all of them.

You can still rename nodes with Enter, or as mentioned above, change ui_select to something else. Unless there is a solution that would solve both issues, having correct behavior with default scheme takes priority, so it's not going to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Not Critical
Development

No branches or pull requests

7 participants