MCPcopy Create free account
hub / github.com/Qinbf/groundmap / handler

Function handler

web/components/PageEditor.tsx:128–133  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

126
127 useEffect(() => {
128 function handler(e: KeyboardEvent) {
129 if ((e.ctrlKey || e.metaKey) && e.key === "s") {
130 e.preventDefault();
131 if (dirty) save();
132 }
133 }
134 window.addEventListener("keydown", handler);
135 return () => window.removeEventListener("keydown", handler);
136 }, [dirty, save]);

Callers 1

POSTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected