how to check if a keyis clicked javascript 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!');
}
});