Use the form's submit event, the default behavior of a form is to submit either when the submit button is clicked, or the enter key is pressed on a form input.
$("#myForm").submit(function(){
$.post( $("#myForm").attr("action"),
$("#myForm :input").serializeArray(),
function(info){ $("#result").html(info); }
);
clearInput();
return false;
});
now make your button a submit button and get rid of the click event. Now, when you press enter in any input other than a textarea, the form will submit and your handler will be called. No need for keydown event handlers and click handlers.