UI Toolkit make focused button activate using Enter but not by Spacebar

I have a game over screen that pops up when the player loses.
When it pops up, I immediately focus the restart button so that the player can restart quickly should they wish to.

public void Activate(int score)
{
    /* ... */
    buttonAndEventsList.FirstOrDefault()?.Item1.Focus();

I noticed that when pressing Enter/Spacebar when a button is focused, it activates the button’s Clicked event.
I wanted to ask if it is possible to make it so the Clicked event is activated only when Enter is pressed and not Spacebar, since Spacebar is a button consistently used in my game, and a player might accidently restart instantly upon death.

Found a scuffed solution

public static void RegisterClickAndEnterEvents(this Button button, Action action)
{
    button.clicked += () => {
        if (Input.GetKeyDown(KeyCode.Return)) action();
    };
    button.RegisterCallback<ClickEvent>((evt) => action());
}

clicked activates from space, enter, and click.

ClickEvent only activates from click.

I still don’t really like this solution, it probably has numerous problems, but its fine for now.

Wouldn’t the inputs be following what is set up in your event system’s associated input module?