(evt: KeyboardEvent)
| 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; |