MCPcopy Create free account
hub / github.com/ShipSecAI/studio / handleKeyDown

Function handleKeyDown

frontend/src/pages/WebhookEditorPage.tsx:251–260  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

249 // Keyboard shortcut
250 useEffect(() => {
251 const handleKeyDown = (e: KeyboardEvent) => {
252 if ((e.metaKey || e.ctrlKey) && e.key === 's') {
253 e.preventDefault();
254 // Only save if action is valid (dirty or new) and not saving
255 const canSave = (isDirty || isNew) && !isSaving;
256 if (canSave) {
257 handleSave();
258 }
259 }
260 };
261 window.addEventListener('keydown', handleKeyDown);
262 return () => window.removeEventListener('keydown', handleKeyDown);
263 }, [handleSave, isDirty, isNew, isSaving]);

Callers

nothing calls this directly

Calls 1

handleSaveFunction · 0.70

Tested by

no test coverage detected