Next stage of form on Keypress

Hi,
I am designing a multistage form using the WIX multistage form object and I was wondering how to go to the next stage of the form when a client presses the enter key.
Thanks

I’m not sure what is " WIX multistage form object".
If you mean multi-state-box then you can do something like:

$w('#input1').onKeyPress(event => {
    if(event.key === 'Enter'){
        $w('#multiStateBox1').changeState('state2Id');
    }
})