MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / handleKeys

Function handleKeys

assets/js/etch_sketch.js:55–60  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

53}
54//handler for keys
55function handleKeys(e) {
56 if (e.key.includes("Arrow")) {
57 draw({ key: e.key });
58 //if they key name is arrowup or arrow down or arrowleft or arrowright
59 }
60}
61//shake and clear function
62function clearcanvas() {
63 canvas.classList.add("shake");

Callers

nothing calls this directly

Calls 1

drawFunction · 0.70

Tested by

no test coverage detected