how to nkow which key was pressed javascript keypress events code example
Example: js when key is pressed
document.addEventListener("keypress", function(event) {
// do stuff
});
document.addEventListener("keypress", function(event) {
// do stuff
});