The following .NET VB code (that generates JavaScript in the browser) works great for capturing the Enter key and firing the login button in FF, and IE but not in Chrome:
password.Attributes.Add("onkeydown", "if(event.which || event.keyCode || event.charCode){if ((event.which == 13) || (event.keyCode == 13) || (event.charCode == 13)) {document.getElementById('" & loginButton.ClientID & "').click();return false;}} else {return true}; ")
It gets the event.keyCode ok but that's it. So I'm guessing it's an issue with the button.click() part.
Does anyone have a clue if it's possible to work around this?