Sample Code:
<apex:page>
<script type='text/javascript'>
function noenter(ev) {
if (window.event && window.event.keyCode == 13 || ev.which == 13) {
callAcctRet();
return false;
} else {
return true;
}
}
</script>
<apex:form>
<apex:actionFunction action="{!retToAcct}" name="callAcctRet"/>
<apex:inputText value="{!firstName}" onkeypress="return noenter(event);"/>
<apex:form>
</apex:page>