how to check if key pressed js code example
Example: how to see if user clicked key in js
document.addEventListener("keyup", function(event) {
if (event.keyCode === 13) {
alert('Enter is pressed!');
}
});
document.addEventListener("keyup", function(event) {
if (event.keyCode === 13) {
alert('Enter is pressed!');
}
});