Enter key instead of button press

The default for the math input lets you hit the enter key instead of pressing the submit button, but I have noticed in some activities the enter key no longer works and the ‘new problem’ button has to be pressed. It happens when an action button replaces the math input submit button? Is there code for the enter key to replace the button press in an action button?