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

Pause Running Project shortcut hotkey should work when the playing game is focused #11875

Open
GustJc opened this issue Feb 28, 2025 · 0 comments · May be fixed by godotengine/godot#103411
Open

Comments

@GustJc
Copy link

GustJc commented Feb 28, 2025

Describe the project you are working on

Random prototypes and tutorials.

Describe the problem or limitation you are having in your project

Even though Godot has a hotkey for pausing the running game, it doesn't work unless the editor itself is focused. Which is almost pointless.

The hotkey should be able to function even if the game is focused. Like the F8 hotkey to close the game does.
This was briefly pointed out in one of the bullet points from #3105

Not sure if this should be a bug or a feature request.

Right now, the hotkey only works when the editor is focused:
(I'm clicking on the editor and only then pressing the hotkey for it to work here)

now_bad.mp4

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Make the Stop Running Project hotkey work while the game is focused and running.

When pause is pressed now, the hotkey works but the game minimizes. But can enable always on top to prevent this behavior:

working.mp4

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

To be able to accept the hotkey event, the script_editor_debugger needs to register the hotkey to the scene_debugger.cpp so it may get the hotkey event and signal back to the script_editor_debugger, who in turn presses the button.

The messaging between them is handled by __put_msg() from script_editor_debugger and the EngineDebugger::send_message to send the message back.

Notes:
This is only for the normal game window.
The embed window pause button is handled very differently from the main window and does not share the same pause behavior or hotkey.
I'll take a look at that one later(if no one else does it), but I think its important that the normal window works first.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, the engine needs to handle this.

Is there a reason why this should be core and not an add-on in the asset library?

This is a basic feature of the engine.

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

Successfully merging a pull request may close this issue.

2 participants