how to detect a keypress in javascript
snippet in javascript

how to detect a keypress in javascript

user6565

window.addEventListener("keydown", (event) => {
	console.log(event.key);
});