addEventListener('keydown') to the global window object. Whenever any key is pressed, it prevents default browser actions (like scrolling with spacebar) and extracts properties like e.keyCode, e.key, and e.code to display them instantly on screen.