Workshop › Wordle-style Word Guess › Step 11 of 26
Ctrl+R should still reload the page, and Ctrl+C copy. Keys held with Ctrl, Cmd or Alt are not for the game, so the listener returns at once for them.
```js
document.addEventListener('keydown', (event) => {
if (event.ctrlKey || event.metaKey || event.altKey) return
```event.ctrlKey, metaKey (Cmd on a Mac) and altKey are true while those keys are held.preventDefault() leaves the shortcut to the browser.In the listener, write the new line at the very top. Press Run.
Skills: Keyboard and mouse input