SyntaxFix
Write A Post
Hire A Developer
Questions
The solution that work for me is the following
$("#element").addEventListener("keyup", function(event) { if (event.key === "Enter") { // do something } });