(e: KeyboardEvent)
| 143 | // Keyboard shortcut: Ctrl/Cmd+S to save |
| 144 | useEffect(() => { |
| 145 | const handler = (e: KeyboardEvent) => { |
| 146 | if ((e.ctrlKey || e.metaKey) && e.key === "s") { |
| 147 | e.preventDefault(); |
| 148 | handleSave(); |
| 149 | } |
| 150 | if (e.key === "Escape") onClose(); |
| 151 | }; |
| 152 | window.addEventListener("keydown", handler); |
| 153 | return () => window.removeEventListener("keydown", handler); |
| 154 | }, [content]); |
nothing calls this directly
no test coverage detected