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 Embed Game Window shortcut hotkeys support for suspend/pause and next frame buttons #103841

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GustJc
Copy link
Contributor

@GustJc GustJc commented Mar 9, 2025

Fixes godotengine/godot-proposals#11948

This add shortcuts for the suspend/pause and next frame buttons inside the embed window.

I've set the following default hotkeys

  • F9 to toggle suspend/pause
  • F10 to advance to next frame

They are the same hotkeys as Breakpoint and Step into hotkeys. But they don't conflict with each other due to different context focus.

The F9 hotkey is using the same convention as the breakpoint hotkey uses for macos.
So the hotkey is: KeyModifierMask::META | KeyModifierMask::SHIFT | Key::B

I've intentionally let the next frame button work with is_echo() so you can hold the button to skip several frames.

This adds a very systematic way to add new shortcuts for the embed window buttons if any more buttons would like to have hotkeys. More info on the steps are inside the issue.

embed.hotkeys.mp4

@GustJc GustJc requested a review from a team as a code owner March 9, 2025 01:56
@KoBeWi KoBeWi added this to the 4.x milestone Mar 9, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Mar 9, 2025

The shortcuts aren't functional at runtime.

Also it would be nice to merge this with the code added in #98891, which does a similar thing.

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

Successfully merging this pull request may close these issues.

Embedded Game Window - Add Pause/Suspend and Next frame hotkeys/shortcuts
2 participants