SyntaxFix
Write A Post
Hire A Developer
Questions
Use event.key instead of event.keyCode!
event.key
event.keyCode
function onEvent(event) { if (event.key === "Enter") { // Submit form } };
Mozilla Docs
Supported Browsers