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

Can't hold shortcut key to repeatedly undo/redo in Editor #79181

Closed
torcado194 opened this issue Jul 8, 2023 · 0 comments · Fixed by #36493
Closed

Can't hold shortcut key to repeatedly undo/redo in Editor #79181

torcado194 opened this issue Jul 8, 2023 · 0 comments · Fixed by #36493

Comments

@torcado194
Copy link

Godot version

v4.1.rc1.official [1f9e540]

System information

Godot v4.1.rc1 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; 31.0.15.2824) - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 Threads)

Issue description

Holding the shortcut for Undo or Redo (Ctrl+Z or Ctrl+Shift+Z by default) does not auto-repeat the action. I would expect the action to be repeated as long as the shortcut is held. This works as expected in the text editor, but not in the global editor.

Removing the && !p_event->is_echo() from this line fixes the issue.

if (p_event->is_pressed() && !p_event->is_echo() && (Object::cast_to<InputEventKey>(p_event.ptr()) || Object::cast_to<InputEventJoypadButton>(p_event.ptr()) || Object::cast_to<InputEventAction>(*p_event) || Object::cast_to<InputEventShortcut>(*p_event))) {

However, that would allow other shortcuts to be repeatable that might not need to be.
("Toggle Fullscreen" (Shift+F11) is the only one I could find that does)

There should probably be some mechanism to mark shortcuts as repeatable. But even in its current state, I'd much prefer being able to repeat undo/redo while having the possibility of some actions repeating than not, just to save my fingers.

Steps to reproduce

Hold Ctrl+Z or Ctrl+Shift+Z

Minimal reproduction project

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment