I\'m writing some unit test in my web apps and I want to automatically trigger an Enter key pressed event from my page after for example a download to text file b
If you're talking about automatically entering an Enter key to trigger a submit event, you can use this instead:
submit
$("#formID").submit();
$("#buttonID").click(function() { $("#formID").submit(); // submits form });