Since this question is about a custom module it would have been better to post in the developer forum.
The answer to the question is that the enter key naturally is the same as clicking a button. In ASP.NET you have some control over it. If the button is contained inside an <asp:Panel and you set DefaultButton to the id of the button like this <asp:Panel id="pnlFoo" runat="server" DefaultButton="btnFoo" ...
Then the enter key will only click the button if the focus is within that panel like if the user clicked anything in the panel or put the cursor in a textbox within the panel then the enter key will be equivalent to clicking the button but if niether of these conditions is met the enter key will not click the button.
Hope it helps,