Skip to content

Add hotkeys for positive and negative options in dialog box#118100

Open
Goldenlion5648 wants to merge 1 commit intogodotengine:masterfrom
Goldenlion5648:dialog-hotkeys
Open

Add hotkeys for positive and negative options in dialog box#118100
Goldenlion5648 wants to merge 1 commit intogodotengine:masterfrom
Goldenlion5648:dialog-hotkeys

Conversation

@Goldenlion5648
Copy link
Copy Markdown
Contributor

@Goldenlion5648 Goldenlion5648 commented Apr 2, 2026

Fixes godotengine/godot-proposals#13954 and fixes godotengine/godot-proposals#14559

This PR adds a hotkey to simulate pressing the positive option in a dialog (the ok_button) and the negative option, like "discard". Not to be confused with the cancel button, which would just close the ui without doing anything.

It seems even without this PR, ui_close_dialog works as the equivalent to pressing cancel, which @Calinou mentioned it didn't previously.

In this video I am using the hotkeys, which work even when that is not the selected button.

screenrecording-2026-04-01_21-33-27.mp4

@Goldenlion5648 Goldenlion5648 marked this pull request as ready for review April 2, 2026 15:08
@Goldenlion5648 Goldenlion5648 requested review from a team as code owners April 2, 2026 15:08
@Goldenlion5648
Copy link
Copy Markdown
Contributor Author

With the above commit, the issue where pressing "y" even when typing the name for a file has been fixed

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.

Add shortcut for don't save in "Please Confirm..." dialogue Add support for Y/N keyboard shortcuts to accept or cancel in ConfirmationDialog

2 participants