Wykryj literę Ketcode

document.addEventListener("keydown", (event) => {
    if (event.code === "Space") {
    	// Spacebar was pressed, do something
    }
});
// Other keyCodes ->
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
Excited Eagle