MCPcopy Create free account
hub / github.com/error311/FileRise / onKey

Function onKey

public/js/filePreview.js:738–742  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

736 prevBtn.addEventListener('click', (e) => { e.stopPropagation(); navigate(-1); });
737 nextBtn.addEventListener('click', (e) => { e.stopPropagation(); navigate(+1); });
738 const onKey = (e) => {
739 if (!document.body.contains(overlay)) { window.removeEventListener("keydown", onKey); return; }
740 if (e.key === "ArrowLeft") navigate(-1);
741 if (e.key === "ArrowRight") navigate(+1);
742 };
743 window.addEventListener("keydown", onKey);
744 overlay._onKey = onKey;
745 }

Callers

nothing calls this directly

Calls 2

navigateFunction · 0.85
setPdfSrcFunction · 0.85

Tested by

no test coverage detected