-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Shift + ui_accept does not work with pressed signal on button #96604
Comments
This is by design, the button only accepts exact event clicks: godot/scene/gui/base_button.cpp Line 63 in b6223c0
So adding shift to it is invalid unless you add that to The question is if it should be strict with mouse presses, and I don't think it should, there's plenty of validity to allow modifiers for mouse clicks but not key clicks IMO I'd suggest opening a proposal to add a modifier mask to |
Why should you not allow a keyboard user to activate the modifier click on the button?
Why does it then work with KEY_A as an example? |
Because UI elements are usually activated with exact actions, otherwise combinations wouldn't work generally, what if you set
Because you're checking if something else is pressed, it activates the button whenever |
I see that now, thanks! |
Tested versions
Godot v4.4.dev1
Godot v4.0.stable
System information
Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+)
Issue description
Shift + ui_accept (same with Ctrl, Alt) does not work with pressed signal on button when usign this code:
This code works if you switch KEY_SHIFT to KEY_A
This works in Godot 3
Steps to reproduce
connect pressed signal to a script
see code above
grab button focus
press shift + ui_accept
nothing is printed
Minimal reproduction project (MRP)
shift-and-accept-in-pressed.zip
The text was updated successfully, but these errors were encountered: