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

Add child node shortcut (CTRL + A) is not working while the scene dock has been clicked or selected #45033

Closed
biswas08433 opened this issue Jan 8, 2021 · 11 comments · Fixed by #71328

Comments

@biswas08433
Copy link
Contributor

Godot version: 4.0

OS/device including version: Windows/ HP Omen 15

Issue description: Add child node shortcut (CTRL + A) is pressed while the scene dock has been selected, the add child node button i.e. the '+' button is holding the pressed state and not being released, so it can generate the 'add child node' window.

Steps to reproduce: 1. Click anywhere in the scene dock. Then press (CTRL+A)

Minimal reproduction project:

@EricEzaM
Copy link
Contributor

EricEzaM commented Jan 9, 2021

Cannot reproduce Win 10, 4.0 master 98ccaa1. Is your add node shortcut set to Control A or did you change it? Are you on latest master?

See my comment below

@biswas08433
Copy link
Contributor Author

biswas08433 commented Jan 9, 2021

Untitled.mov

@EricEzaM
Here is the issue what's happening. I don't know if this is machine-specific.

I think the issue is the 'add child node' window will appear only if the '+' icon has been pressed and released. In the stable version, the window appears as soon as the button is pressed, it doesn't wait for the release of the button.
The (CTRL + A) is just pressing the button (as it is blue) but not releasing it correctly everytime.

@EricEzaM
Copy link
Contributor

EricEzaM commented Sep 20, 2021

I think I figured out the source of the issue...

Try Pressing Ctrl + A, and releasing the buttons in the following orders, and please confirm results:

  • Release A first = works, dialog opens.
  • Release Ctrl first = does not work, button stays in pressed state.

@jmb462
Copy link
Contributor

jmb462 commented Sep 20, 2021

I can confirm that the release order matters.
Need to release A first to work.

@Mickeon
Copy link
Contributor

Mickeon commented Sep 5, 2022

I cannot reproduce this on master, v4.0.alpha.custom_build [00fa4e2], Windows 10.

@biswas08433
Copy link
Contributor Author

I interpreted the issue wrong. Actually the issue is the release order of the keys. I should change the issue subject.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 8, 2022

I don't get this issue. Ctrl is a modifier key. Only A will trigger the shortcut.
If it's only about the release order then its not related to Add Child Node and it's not even a bug.

I checked in 3.5 and the difference is that the shortcut is triggered by press, not by release.

@rcorre
Copy link
Contributor

rcorre commented Dec 8, 2022

The issue is that the sequence:

  1. Press control
  2. Press A
  3. Release control
  4. Release A

Would open Add Child on 3.5 but will not open Add Child on 4.x.

I tend to hit those keys in a "rolling" stroke that often leads to releasing ctrl before A, to the point where I initially thought the shortcut wasn't working at all in Godot 4. I have to slow down and press my keys very deliberately for it to work in Godot 4, which is not true of Godot 3 or any other program I can think of.

There's a very noticeable impact on user experience for me, so if it's not a bug, it's at least a usability request.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 8, 2022

So as I said

Would open Add Child on 3.5 but will not open Add Child on 4.x.

it only works because the shortcut actually triggers at "Press A". You don't need to release it.

@rcorre
Copy link
Contributor

rcorre commented Dec 9, 2022

it only works because the shortcut actually triggers at "Press A". You don't need to release it.

That's true in Godot3 but not in Godot4. Is it reasonable to request that shortcuts also trigger on press in Godot4?
It seems that the "on release" behavior leads to a lot of mis-inputs, based on all the people who have found this issue.

I double-checked a number of other programs I use frequently (st, dwm, qutebrowser, blender, vim) and all seem to interpret shortcuts on press, not release, so it seems reasonable to expect Godot to behave this way.

@EricEzaM
Copy link
Contributor

Related to #40464

reduz added a commit to reduz/godot that referenced this issue Jan 13, 2023
* Button shortcuts were treated as generic input events on buttons. This means that to activate a button shortcut you had to press and release.
* This logic is removed and now shortcuts always activate on press.
* This makes the editor feel more responsive and solves problems related to this behavior.

Fixes godotengine#45033 and possibly others.
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Jan 13, 2023
Streq pushed a commit to Streq/godot that referenced this issue Feb 9, 2023
* Button shortcuts were treated as generic input events on buttons. This means that to activate a button shortcut you had to press and release.
* This logic is removed and now shortcuts always activate on press.
* This makes the editor feel more responsive and solves problems related to this behavior.

Fixes godotengine#45033 and possibly others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants