MCPcopy Create free account
hub / github.com/Botloader/botloader / handleKeyDown

Function handleKeyDown

frontend/src/components/ScriptEditor.tsx:48–56  ·  view source on GitHub ↗
(evt: KeyboardEvent)

Source from the content-addressed store, hash-verified

46 useEffect(() => {
47 let ctrlSIsDown = false;
48 function handleKeyDown(evt: KeyboardEvent) {
49 if (evt.ctrlKey && evt.code === "KeyS") {
50 evt.preventDefault();
51 if (!ctrlSIsDown) {
52 ctrlSIsDown = true;
53 save();
54 }
55 }
56 }
57 function handleKeyUp(evt: KeyboardEvent) {
58 if (evt.ctrlKey && evt.code === "KeyS") {
59 ctrlSIsDown = false;

Callers

nothing calls this directly

Calls 1

saveFunction · 0.70

Tested by

no test coverage detected