(event: any)
| 171 | |
| 172 | useEffect(() => { |
| 173 | const handleKeyDown = (event: any) => { |
| 174 | if (isMetaEquivalentKeyPressed(event) && event.code === "KeyC") { |
| 175 | const selection = window.getSelection()?.toString(); |
| 176 | if (selection) { |
| 177 | setTimeout(() => { |
| 178 | void navigator.clipboard.writeText(selection); |
| 179 | }, 100); |
| 180 | } |
| 181 | } |
| 182 | }; |
| 183 | |
| 184 | window.addEventListener("keydown", handleKeyDown); |
| 185 |
nothing calls this directly
no test coverage detected