JS Keydown только один раз
document.addEventListener('keydown', (e) => {
if (!e.repeat)
console.log(e.key);
});
Pleasant Pigeon
document.addEventListener('keydown', (e) => {
if (!e.repeat)
console.log(e.key);
});