X Tutup
Skip to content

Add ability to add new EditorSettings shortcuts#102889

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:add-editorsettings-shortcuts
Nov 14, 2025
Merged

Add ability to add new EditorSettings shortcuts#102889
Repiteo merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:add-editorsettings-shortcuts

Conversation

@ryevdokimov
Copy link
Contributor

@ryevdokimov ryevdokimov commented Feb 15, 2025

Salvages: #58585

Closes godotengine/godot-proposals#4112.
Closes godotengine/godot-proposals#2024.

Related: godotengine/godot-proposals#11424 (comment)

Address the comments in the salvaged PR, fixed the shortcut name being blank in the editor setting shortcut tree, and other minor modifications.

@KoBeWi

This comment was marked as resolved.

@KoBeWi
Copy link
Member

KoBeWi commented Jul 8, 2025

I see there is some mixup here. Are the new methods supposed to handle only custom shortcuts, or all shortcuts? If the former, the built-in actions in get_shortcut() should be ignored and has_shortcut() should only do shortcuts.has(p_path).

@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented Jul 9, 2025

Are the new methods supposed to handle only custom shortcuts, or all shortcuts?

Personally, I'm in favor of allowing the user to do whatever they want, in the same vein of them being able to remove any UI element in the editor. An example may be someone creates a custom GridMap plugin that is supposed to basically replace the built-in one. Let's say the plugin doesn't have a Next Floor shortcut for whatever reason (they came up an alternative way to handle this), this gives them the ability to remove it to avoid confusion.

@ryevdokimov ryevdokimov force-pushed the add-editorsettings-shortcuts branch 2 times, most recently from 229c15f to 5d526e1 Compare July 9, 2025 17:46
List<String> shortcut_list;
get_shortcut_list(&shortcut_list);
Vector<String> ret;
while (shortcut_list.size()) {
Copy link
Member

@KoBeWi KoBeWi Jul 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use range iterator instead.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.6 Jul 10, 2025
@ryevdokimov ryevdokimov force-pushed the add-editorsettings-shortcuts branch 2 times, most recently from 4da2a8e to 2e277c6 Compare July 10, 2025 14:23
@ryevdokimov
Copy link
Contributor Author

Feedback addressed.

@peterhoglund
Copy link

Is this planned for 4.6?

Co-Authored-By: Igor Kordiukiewicz <igorkordiukiewicz@gmail.com>
@ryevdokimov ryevdokimov force-pushed the add-editorsettings-shortcuts branch from 2e277c6 to 8806036 Compare November 5, 2025 19:10
@ryevdokimov ryevdokimov requested a review from a team November 5, 2025 19:10
@Repiteo Repiteo merged commit d602742 into godotengine:master Nov 14, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 14, 2025

Thanks!

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.

Expose EditorSettings shortcut related functions Allow plugins to register shortcuts in the editor menu

7 participants

X Tutup