document.addEventListener('keypress', function(e) {
if (e.keyCode === 32) {
console.log('space pressed');
}
});
document.addEventListener('wheel', function(e) {
const event = new Event('keypress');
event.keyCode = 32;
document.dispatchEvent(event);
});