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

Function keyUpHandler

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

Source from the content-addressed store, hash-verified

51}
52
53function keyUpHandler(e) {
54 if(e.key == "Right" || e.key == "ArrowRight") {
55 rightPressed = false;
56 }
57 else if(e.key == "Left" || e.key == "ArrowLeft") {
58 leftPressed = false;
59 }
60}
61
62function mouseMoveHandler(e) {
63var relativeX = e.clientX - canvas.offsetLeft;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected