Prevent Enter key from closing PropertyManager Page

I created a PropertyManager page for an add-in. I'm looking to change what happens when enter is pressed. Currently no matter where the focus is set to, pressing enter on the keyboard will close the page without warning the user. I'd rather enter to do something else and leave the page open.

SolidworksApi macros