Skip to content

Don't allow duplicate events in input actions editor#115822

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Nintorch:fix-duplicate-inputmap-events
Feb 27, 2026
Merged

Don't allow duplicate events in input actions editor#115822
Repiteo merged 1 commit intogodotengine:masterfrom
Nintorch:fix-duplicate-inputmap-events

Conversation

@Nintorch
Copy link
Contributor

@Nintorch Nintorch commented Feb 3, 2026

Fixes #87707
Fixes #95283

This PR checks if the InputEvent the user is trying to add to an action already exists in that action, and if it does, the user is not allowed to add it again. Previously, it was allowed.

2026-02-06.00-50-29.mp4

@Nintorch Nintorch requested a review from a team February 3, 2026 15:19
@Nintorch

This comment was marked as resolved.

@Nintorch Nintorch force-pushed the fix-duplicate-inputmap-events branch from c3d28df to f67f61d Compare February 4, 2026 05:56
@Nintorch
Copy link
Contributor Author

Nintorch commented Feb 5, 2026

I added a video to show how this PR works and what the result looks like!

@Nintorch Nintorch changed the title Don't allow duplicate events in actions in ActionMapEditor Don't allow duplicate events in input actions editor Feb 8, 2026
@Nintorch Nintorch requested a review from a team February 17, 2026 15:22
@AdriaandeJongh AdriaandeJongh requested a review from a team February 27, 2026 13:05
Copy link
Contributor

@AdriaandeJongh AdriaandeJongh left a comment

Choose a reason for hiding this comment

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

Didn't look at the code but the usability looks good to me.

@AdriaandeJongh AdriaandeJongh modified the milestones: 4.x, 4.7 Feb 27, 2026
@Nintorch
Copy link
Contributor Author

Thank you for your review, AdriaandeJongh! :)

@KoBeWi
Copy link
Member

KoBeWi commented Feb 27, 2026

Shouldn't the error be red?

@AdriaandeJongh
Copy link
Contributor

that will help this PR, agreed!

@Nintorch
Copy link
Contributor Author

I'm not familiar with the correct way to change color of a UI text (so that it also reacts to theme color changes), so I would like some help in this regard! 😅

@KoBeWi
Copy link
Member

KoBeWi commented Feb 27, 2026

Add (not tested)

event_exists->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor));

in NOTIFICATION_THEME_CHANGED.

@Nintorch Nintorch force-pushed the fix-duplicate-inputmap-events branch from 81e3e74 to ce1330f Compare February 27, 2026 15:36
@Nintorch Nintorch force-pushed the fix-duplicate-inputmap-events branch from ce1330f to da2fb04 Compare February 27, 2026 15:53
@Nintorch
Copy link
Contributor Author

Thank you for your review, KoBeWi! :)

@Nintorch
Copy link
Contributor Author

Add (not tested)

event_exists->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor));

in NOTIFICATION_THEME_CHANGED.

Looks like it works!
image

@Repiteo Repiteo merged commit afdd7af into godotengine:master Feb 27, 2026
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 27, 2026

Thanks!

@Nintorch Nintorch deleted the fix-duplicate-inputmap-events branch February 28, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants