MCPcopy Index your code
hub / github.com/WebDevSimplified/wordle-clone / handleKeyPress

Function handleKeyPress

script.js:15332–15347  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

15330}
15331
15332function handleKeyPress(e) {
15333 if (e.key === "Enter") {
15334 submitGuess()
15335 return
15336 }
15337
15338 if (e.key === "Backspace" || e.key === "Delete") {
15339 deleteKey()
15340 return
15341 }
15342
15343 if (e.key.match(/^[a-z]$/)) {
15344 pressKey(e.key)
15345 return
15346 }
15347}
15348
15349function pressKey(key) {
15350 const activeTiles = getActiveTiles()

Callers

nothing calls this directly

Calls 3

submitGuessFunction · 0.85
deleteKeyFunction · 0.85
pressKeyFunction · 0.85

Tested by

no test coverage detected