MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / handleKeydown

Function handleKeydown

docs/script.js:194–208  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

192 const carousel = document.querySelector(".hero-carousel");
193 if (carousel) {
194 const handleKeydown = (e) => {
195 if (document.activeElement === document.body || carousel.contains(document.activeElement)) {
196 if (e.key === "ArrowLeft") {
197 e.preventDefault();
198 prevSlide();
199 stopAutoPlay();
200 startAutoPlay();
201 } else if (e.key === "ArrowRight") {
202 e.preventDefault();
203 nextSlide();
204 stopAutoPlay();
205 startAutoPlay();
206 }
207 }
208 };
209
210 document.addEventListener("keydown", handleKeydown);
211 }

Callers

nothing calls this directly

Calls 5

prevSlideFunction · 0.85
stopAutoPlayFunction · 0.85
startAutoPlayFunction · 0.85
nextSlideFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected